1
$\begingroup$

This is a diagram of the LC3 Computer enter image description here

I am trying to understand what is happening in the parts I highlighted. The part I had highlighted had the instruction bit sign extended to 16 bits and then passed on to the SR2 Mux. Does anyone know what instruction is being carried out here or what the role of the mux(SR2) is here?

$\endgroup$
4
  • 1
    $\begingroup$ more intro/ bkg on the LC3 would be helpful. MUX= multiplexer. it chooses 1 of n inputs controlled by a address. this might go better on Electrical Engineering $\endgroup$
    – vzn
    Commented Apr 23, 2015 at 1:06
  • 2
    $\begingroup$ You have to be able to formulate a question in your own terms, from start to finish. You seem to be asking for help in understanding your study material. I believe that's not our job. $\endgroup$ Commented Apr 23, 2015 at 1:07
  • 2
    $\begingroup$ The MUX selects either the sign-extended immediate from the instruction or the second register operand. An instruction like ADD r2, R3, #4 (not necessarily provided by LC-3) would select the immediate, while ADD r2, R3, R2 would select the register operand. $\endgroup$
    – user4577
    Commented Apr 23, 2015 at 10:48
  • $\begingroup$ @vsz I'm guessing it's talking about en.wikipedia.org/wiki/LC-3, but I'm not familiar with it. $\endgroup$ Commented Apr 23, 2015 at 12:26

1 Answer 1

2
$\begingroup$

This would appear to be a picture of the LC-3 data path from the book Patt, Yale N; Patel, Sanjay J: Introduction to Computing Systems.

The IR is the instruction register, the register where the actual bits of the instruction are fetched in the beginning cycles of processing the instruction. The SEXT unit takes the immediate field out of the instruction. The SR2MUX is used by the control unit to control whether the second operand of the instruction comes from a register operand or the immediate operand.

$\endgroup$
1
  • 1
    $\begingroup$ You might mention that SEXT (obvious from the name) sign extends the immediate ("takes ... out" kind of implies a simple extraction, i.e., extending with zero). $\endgroup$
    – user4577
    Commented Apr 24, 2015 at 11:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.