

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


ECE383 Sample questions for Exam #1 The exam will be closed book/notes.
10111010b _____0xBA__________
93 _____0x5D__________
-27 (2’s complement format) _____0xE5__________
If the clock has a 40% duty cycle, then 60% of the time the clock is low. Therefore 20ns/.6=33.33ns is the total clock period. The clock frequency is 1/period=1/33.33ns=30MHz.
OUTREG is a 4-bit register to hold the output from the OUT instructions. It is loaded with a 4-bit value from memory when the OUT instruction is executed.
PC is a 4-bit up counter that acts as the program counter for the simple computer. Its value is normally increments except when a branch is taken. In that case, the value loaded into the PC is a 4-bit value taken from memory.
The 16x6 memory holds the instructions to be executed by the simple computer. Each instruction is a 6-bit value consisting of s 2-bit OPCODE and a 4-bit field representing either a value to output or a new value to be loaded into the PC register.
The LOC input, along with the 2-bit OPCODE value act as inputs to the control logic which controls how the PC register operates.
MOV.B #0xE3,W4 __0xB3CE34_______________
ADD 0x0804,WREG __0xB40804_______________
MOV [W2],W6 __0x780312_______________
Give the value of the modified memory location or register for each of the following instructions:
MOV.B [W3],W0 __0x10DD_________
MOV W1,0x800 __0x2000_________
ADD 0x0802,WREG __0xEDCC_________
SUB 0x0802,WREG __0xCDCC_________
while (u16_i != u16_k) { loop body statements }
loop_top: mov u16_k,WREG cp u16_i bra Z,loop_end ; loop body bra loop_top loop_end:
while ((u8_x != 0) && (u8_y < u8_z)) { loop body statements }