Question about example prob. given in ALU

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about example prob. given in ALU

JerJohnson
I have a question regarding the worked out example that the book explains on page 35 in chapter 2. In order to determine the inputs for the function x-1, they are using the boolean values of 1 and 0, 1 being true and 0 false. So when the bit is 0, the x input is not zeroed or negated, and the no bit is not negated, and when 1, y is zeroed then negated bitwise, and the arithemitic is addition. I'm I correct?
Reply | Threaded
Open this post in threaded view
|

Re: Question about example prob. given in ALU

ybakos
You've got the right idea. Isn't it interesting how by combining a handful of operations on x and y we can exhibit different higher-order operations? Search the forum for the "ALU Worksheet" if you need help convincing yourself about how this works.
Reply | Threaded
Open this post in threaded view
|

Re: Question about example prob. given in ALU

JerJohnson
This post was updated on .


Attached is my ALU worksheet solutions(there was no attachment option when I tried to send this via email).

Reply | Threaded
Open this post in threaded view
|

Re: Question about example prob. given in ALU

ybakos
Cool. But why are you posting this? Maybe its best not to, in order to prevent others from being tempted to look at solutions rather than work through the worksheet.
Reply | Threaded
Open this post in threaded view
|

Re: Question about example prob. given in ALU

JerJohnson
That's why I was gonna try to send it to you via email but I couldn't see an option for attaching a file. I've deleted it from my previous post though.
Reply | Threaded
Open this post in threaded view
|

Re: Question about example prob. given in ALU

JerJohnson
I'm still not getting the purpose of writing the decimal values for f(x,y), nor the two four bit binary numbers located at the top of each chart (ex. f(x,y)=x "0100 4", 0100 for x and 0101 for y. )

Reply | Threaded
Open this post in threaded view
|

Re: Question about example prob. given in ALU

ybakos
I tend to think in terms of base 10, so to "check the math" it make sense to see the base 10 before/after the process. Make sense?

Writing them in binary lets you see the "magic" of the numbers as they pass through each step... resembling the processing within the ALU.

Bottom line: it's an exercise.
Reply | Threaded
Open this post in threaded view
|

Re: Question about example prob. given in ALU

JerJohnson
This post was updated on .
^ Ok.

 I'm having difficulty understanding how the ALU chip (specifically CMP file) is
 working. In ch 2 pg 39 the implementation instructions says that "my first step is to create a logical circuit that manipulates a 16 bit input according to the nx and zx control bit".Does this mean I have to create a condition statement for finding zx and nx,as well as zy,ny,f,
and no, using binary digits?
If this is true then going back to the cmp file in the ALU chip, I'm assuming that when it's running its starting from the two 16-bit inputs, x[16] and y[16],x[16] first to determine
 the conditions for zx and nx then y[16] to determine the conditions for
zy and ny. From here the chip is using logic to determine to create condition statements for the last two control bits right?
-------------------

*Updated*

Nevermind, I didn't look at the tst file, now I understand how it works.