Trouble on understanding ALU 2-bit design

I'm new to this site and I'm pretty "noobish" to electrical engineering coming from a software engineering background I was hoping someone could help me understand this design a bit. I've highlighted two part of the diagram that obviously aren't gates.

I'd like some help understanding what it is and how it could be implemented with gates if possible or if needed. It's a Multiplexer.

Inputs A,B,C select what input goes to output.

Example: ABC = 011 (binary) = 3 (decimal) in that case D3 will be set as output.

• Do you know if there's a way to modify the ALU to output the result in binary? – theCodeMonsters Aug 8 '13 at 8:43
• Or is it already outputting the right value somewhere and I'm just not seeing it? That is, without the multiplexer. – theCodeMonsters Aug 8 '13 at 8:56
• It always outputs the result in binary on OUT. The multiplexer selects which function is applied to A and B. – pjc50 Aug 8 '13 at 8:58
• What would the Multiplexer look like then in terms of gates? – theCodeMonsters Aug 8 '13 at 9:20
• @thecodemonsters: in the 74HC151 datasheet a logic diagram is shown in figure 3 – Johan.A Aug 8 '13 at 10:09

It's a multiplexer. It selects which function the ALU outputs, by selecting which set of gates gets routed to the output. If OP[2:0] == 0, for example, then OUT = A xor B. If OP == 3, then OUT = A + B + carryin.