





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!






“...there would be no more wars, the nations were so economically interdependent.” —S. Foster Damon, remembrance ca. 1912
Please answer concisely. If you find yourself writing more than a few words or a simple drawing, your answer is probably wrong.
generates an overflow when added to itself?
address outside the range of the branch instruction. Assume that the address to which you want to branch is stored in R5. Write your instruction(s) in binary. Note: you may not need all the lines provided below.
the memory byte-addressable (a byte is 8 bits) without changing its size, and without changing the size of the instructions (16 bits), how many bits would be necessary in the following registers?
In a typical memory, setting the write enable input (WE) to 1 causes all bits of the selected memory location to accept new values. For a certain ECE445 (senior design) project, we need a 4-address, 3-bit addressable memory that allows us to write to each bit at a location separately. To do so, we hired a computer engineer from the University of Michigan.
The design is done by modifying the 4-address, 3-bit, memory that we discussed in class. Except for the WE input, all inputs and outputs remain the same. More specifically, ADDR is a 2-bit input for address selection, Din is a 3-bit input for providing bits when writing to a memory location.
As for the WE input, the modified memory structure no longer has a single WE input to all bits. Rather, when a location is selected, 3 WEout signals will independently determine if each bit in that location will be written. This modification has already been done by an Illinois student.
The Michigan engineer proposes to construct a combinational logic that provides a nice external interface for using the memory. The logic translates a 4-bit WE external input signal into the internal 3-bit WEout signals as follows:
WE is 4 bits wide and behaves as follows: WE [3:0] = 0001 => write to bit 0 only WE [3:0] = 0010 => write to bit 1 only WE [3:0] = 0100 => write to bit 2 only WE [3:0] = 1000 => write to all the bits WE [3:0] = 0000 => do not write to any of the bits WE [3:0] = other => treat as a read cycle
Assuming correct implementation and assuming that all the bits in the memory are initialized to 1, fill in the table on the right to reflect the final state of the memory (after the six cycles).
Cycle # ADDR[1:0] WE[3:0] Din[2:0] 1 00 0100 000 2 10 1000 010 3 10 0000 110 4 01 0010 001 5 11 0001 011 6 00 1000 100
next round of tests revealed some undesired behavior. Examining his design, we found the following logic for generating the signals that specify whether or not each individual bit is written (WEout[2:0]).
In 25 words or less, explain the undesired behavior.
A certain finite state machine implements a pattern recognition system that recognizes specific sequences of inputs. Each input represents a letter, such as A or B. An input sequence can be written as a sequence of letters such as “ABAAABBBABA…”. For this finite state machine, the output Z is 1 when an input sequence has an even number of A’s and an odd number of B’s. Otherwise, the output Z is 0. The states needed are named as follows:
S (^) EE even number of A’s and even number of B’s S (^) EO even number of A’s and odd number of B’s S (^) OO odd number of A’s and odd number of B’s S (^) OE odd number of A’s and even number of B’s
state names have been drawn for you. Add appropriate output values and all transition arcs. Label arcs as either A or B.
The circuit below shows an implementation of the finite state machine using two flip-flops and state representation (bits P 1 P 0 ) given by S (^) EE = 00, S (^) EO = 01, S (^) OO = 10, and S (^) OE = 11. The blocks labeled 1 and 2 use the current state P (^) 1P 0 and the inputs X 1 X 0 to calculate the next state, N 1 N (^) 0. The letter A is represented as X 1 X (^) 0=00, and the letter B is represented as X 1 X (^) 0=01.
An LC-3 is about to perform an instruction FETCH. The contents of the register file, PC, MAR, MDR, IR, and part of memory are shown to the right.
You may wish to consult the last page of this exam, which gives the LC-3 instruction set encoding and RTL.
for the next four instructions to be executed by the LC-3. For PC-relative addressing modes, write addresses relative to PC rather than calculating the actual address to be used, e.g., write “PC+x12” rather than adding the two values for that instruction.
R0 xA5A5 x3A06 x6CBC R1 x1000 x3A07 x1FF R2 x1298 x3A08 x R3 x1981 x3A09 x R4 x4345 x3A0A x R5 x0BEE x3A0B x R6 x3A0F x3A0C x R7 xF025 x3A0D x09FD x3A0E xF PC x3A0A x3A0F xFFF MAR x39A3 x3A10 x MDR x0E66 x3A11 x IR x0E66 x3A12 x x3A13 x6CBC ...
MAR, MDR and IR after the LC-3 processes the first three instructions.
the LC-3 processes one additional instruction after Part B, i.e., four instructions in all.
cessed after xF025). What are the contents of R0 and R1 when the LC-3 halts?
Use this page for scratchwork.