Computer Organization & Programming Chapter4 Combinatorial Components.
-
Upload
amie-hancock -
Category
Documents
-
view
231 -
download
2
Transcript of Computer Organization & Programming Chapter4 Combinatorial Components.
![Page 1: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/1.jpg)
Computer Organization & Programming
Chapter4
Combinatorial Components
![Page 2: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/2.jpg)
Some common, useful combinatorial circuits
Multiplexor• Some number (power of 2) of inputs and some control inputs
• The current values on the control lines are interpreted as a binary representation of the number of one of the other inputs. That input is passed through to the output.
Demultiplexor• Reverse of the multiplexor
• Single input is routed to one of a number (power of 2) output lines, depending on the control lines.
Decoder• Takes an n-bit input number and uses it to select exactly one of 2n
output lines• note difference between demultiplexor and decoder• The selected output line will have a 1, not a selected input value.
Comparator• outputs a 1 if two input values are equal, 0 otherwise
![Page 3: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/3.jpg)
Comparator
All the As represent one input word, all the Bs represent another input word. The output will be one only if the two inputs are the same
![Page 4: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/4.jpg)
Mux (multiplexer) 2 -> 1
![Page 5: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/5.jpg)
Mux 2 -> 1 implementation
![Page 6: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/6.jpg)
Mux 4 -> 1
![Page 7: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/7.jpg)
Mux 8 -> 1Abstract representation of a multiplexor. The circuit details are hidden, but the essentials are visible.
![Page 8: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/8.jpg)
Implement a Boolean Function using Mux
![Page 9: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/9.jpg)
Decoder 3->8
![Page 10: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/10.jpg)
Decoder circuit
![Page 11: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/11.jpg)
Decoder 4 -> 16
![Page 12: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/12.jpg)
Implement a Boolean Function using Decoder
![Page 13: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/13.jpg)
Shifter
C determines if the shift will be left or right.
Assume D = 10000110. Show exactly what passes through each gate, and what ends up in S.
![Page 14: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/14.jpg)
Half Adder
Called a half adder because it does not do the whole job: it does not add a carry in.
![Page 15: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/15.jpg)
Full Adder
![Page 16: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/16.jpg)
Example – 4bit Adder
![Page 17: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/17.jpg)
Example – 4bit Adder/Subtractor
![Page 18: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/18.jpg)
ALU Slice
![Page 19: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/19.jpg)
1bit ALUWhat happens if F= 11, A=1, B=1, carry in = 1
What happens if F= 10, A=1, B=1, carry in = 1
Note INVA (Inverse A), ENA (Enable A), ENB (Enable B)
Once we have the circuit understood, note the inputs and the outputs. We can hide the rest of the details in using this device.
![Page 20: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/20.jpg)
8Bit ALU
![Page 21: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/21.jpg)
Overflow
![Page 22: Computer Organization & Programming Chapter4 Combinatorial Components.](https://reader036.fdocuments.net/reader036/viewer/2022062718/56649eab5503460f94bb05f7/html5/thumbnails/22.jpg)
ALU with overflow detection