



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Main points of this past exam are: Million Address, Logic Design, Switch Level, Boolean Expression, Transistors, Memory and Shifting, Memory System, Indicate Bit Width, Incomplete Design, Encoding and Counting
Typology: Exams
1 / 6
This page cannot be seen from the preview
Don't miss anything!
Outy
B
C D
Out x
D A
F
B
C
B C
E
F
D E
A
C
E
A B
E
A
D
F
F
A B C D E F
OUTx
1M x 4
1M x 4
1M x 4
1M x 4
2-to- decoder
R 3-to-1 Mux
C L R 3-to-1 Mux
C L R 3-to-1 Mux
R C L 3-to-1 Mux
C L
2 Rot 3-to-1 Mux
1 Arith
0 Log
2 Rot 3-to-1 Mux
1 Arith
0 Log
Shift?
2 2
2 Rot 3-to-1 Mux
1 Arith
0 2 Log
2 Rot 3-to-1 Mux
1 Arith
0 Log 2
R 3-to-1 Mux
R C L 3-to-1 Mux
C L
label instruction comment
sw $x,($29) # store $x on stack
addi $29, $29, -4 # decrement stack ptr
chromakey: addi $12,$0,2000 # blue screen image starts at addr 2000 addi $15,$0,3024 # initialize $15 to upperbound addr 3024 loop: addi $13,$12,2000 # background image is 2000 away from blue scr. lw $1, ($12) # read in pixels from blue screen image lw $2, ($13) # read in pixels from background image Push($12) # preserve values of registers Push($15) # that are needed after the Push($1) # calls to subroutines (in case Push($2) # the subroutines write over Push($31) # the current register values) jal create_mask # $3 = create_mask($1) jal mask_B # $4 = not($3) Pop($31) # pop the register values off in Pop($2) # the reverse order in which they Pop($1) # were pushed Pop($15) Pop($12) and $6,$2,$3 # $6 = background pixels AND mask and $7,$1,$4 # $7 = blue screen pixels AND NOT(mask) or $8,$6,$7 # $8 = $6 or $ addi $14,$12,5000 (^) # output image is 5000 away from blue scr. sw $8, ($14) # save output image pixels addi $12,$12,4 # increment blue screen image address bne $12,$15,loop # loop back if still below upperbound jr $31 # return to caller
address label instruction 6824 bne $7, $8, -