I am working my way through the book and also trying to understand how the electronic circuits would look as I am going through each gate but I am really struggling to understand the concept of the AND16 gate.
I am trying to understand how the gate would look on paper first. Is it simply 16 AND gates, which means 32 inputs(16*a and 16*b) and 16 outputs. How would the inputs be connected to the bus if it is only 16bits wide and there are 32 inputs.
Which leads to the bit that I am finding really confusing, If the bits being sent to the gate are only 16 bits then that means there are sixteen inputs that aren`t receiving anything. Is it a case of a 16bit bus has 32 wire and the other sixteen bits are padded with 0`s or am I looking at this completely wrong.
Ok sorry for being stupid about something that should be so simple but if a 16bit input (i.e. 1010101010101010) is sent down a bus that has 32 wires which inputs of the 32 that the AND gate has receive these signals and what happens to the other inputs.
Again sorry for being a bit stupid and thanks for the help so far.
The 16-bit a bus is completely independent of the 16-bit b bus.
Have you made and tested your Not16? If you have, model the And16 after your Not16. You will have 16 Ands in the PARTS section. Each And will have its a inputs connected to a bit of the a bus, and its b input connected to the corresponding bit of the b bus.
If you have not made your Not16 yet, you may be confused about what the And16 gate is. It is not a 16 input And gate with one output, rather it is 16 independent 2 input And gates, one for each bit of the a, b and out buses.
Ok sorry for being stupid about something that should be so simple
No, not stupid! (Trust me, I'm the dumbest person on the forum and I can prove it.)
As Mark says above, be sure you have implemented Not16 before And16.
Notice how Not16 has one 16-bit input, and one 16-bit output.
And16 has two 16-bit inputs, a and b. Where do you connect a0 - a15 to? And where do you connect b0 - b15 to?
but if a 16bit input (i.e. 1010101010101010) is sent down a bus that has 32 wires which inputs of the 32 that the AND gate has receive these signals and what happens to the other inputs.
In a nutshell, this really would not happen as you describe. But to answer your question, "which inputs of the 32 that the AND gate has receive these signals?" the answer is, well, we don't know, as you haven't specified which wires are carrying significant information; and to answer "what happens to the other inputs?" you can probably assume that they would be 0. But again, things just aren't used this way.
Let me give you one more illustration. A basic And gate receives two inputs. If both inputs are 1, then the output is 1, correct? A 16-bit And also receives two inputs, and each of these inputs are buses consisting of "16 wires" each. Bus a consists of 16 wires, and bus b consists of 16 wires. For each pair of corresponding wires between the a and b buses, the And16 will perform a logical AND operation, and the resulting output will be sent on the corresponding wire within the 16-bit output bus.
For example, if wires a0 and b0 are 1, then out0 will be 1. If wires a10 and b10 are 1, then out10 will be 1.
Take the time to draw this on paper, after you have completed Not16.
If I do then basically the 16 bit a bus would receive data from say a memory location and the 16 bit b bus would receive data from a different memory location and then each a and b pair is anded together to give you one 16 bit output.