larc in logisim Flashcards
how can complicated logic gates store & execute computer programs
computers can chain logic gates together by connecting the output of one into the input of another. this allows for more complex operations than a single gate
(overall structure) how many general-purpose registers?
16
(overall structure) each register holds?
16-bit binary number
(overall structure) general-purpose registers are numbers
0-15 or 0b0000 to 0b1111 in binary
(overall structure) register 0 is always
0
(overall structure) fetch-and-execute cycle
16-bit number in PC gives address of memory location that contains next ML instruction –> computer fetches instruction from address –> adds one to PC for next instruction –> executes instruction –> repeats until halted
(overall structure) what goes inside larc computer
- PC
- ROM
- Register file
- ALU
- RAM
- Clock
role of the clock
signal that keeps control unit moving
at each clock ‘tick’
control unit moves to next machine cycle (next instruction / next phase of current instruction)
clock generator cycle
based on crystal oscillator, generates regular sequence of 0 & 1 logic
one clock cycle
tick –> rising edge –> tock –>falling edge
program counter (PC)
register that holds counter / current # of steps of program; when program is executed, +1 is added, proceeds to next instruction
(structure of register file) registers are memory used to
accept, store, & transfer data/instructions being used immediately by CPU
(structure of register file) important functions of registers
fetching, decoding, & execution
(structure of register file) data register do what?
hold numbers, characters, & arrays
(structure of register file) address registers do what?
save addresses & access primary memory of system
(structure of register file) general purpose registers do what?
act as both data & address registers; sometimes store floating numbers
where can next value for PC come from?
- PC + 1
- register whose number is rb (jalr instruction)
- PC + 1 + sign-extended LIMM (for inez, beqz)
how is opcode used to control computation
each operation has own opcode; computer recognized which operation and accordingly manipulates values to get desired outcome
opcodes numbered 0b0000 to 0b1111
begins with arithmetic –> through intermediate –> memory & jump –> ends with syscall
build logic circuit to test opcode
convert “right pathways”/”correct op-codes” into boolean using n0, n1, n2, n3 as 4 op-code digits & wires that will go thru circuit
–> write correct wires & connect with AND gate , then connect all correct inputs with OR gate