Re: Problem in 2's compliment
Posted by
RasenRhino on
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/Problem-in-2-s-compliment-tp4036032p4036038.html
I just added it to the "parts" portion of the standard template of the alu program. Nothing else.
Yes, for any value of zero, like till not operation, it gives me the right value, but as soon as I increment it using INC16 , it gives me 0. I tried using add16, writing my own chips as suggested in the course rather than using the built-in ones, still the same output.
Well, I was going to use this as an output for the negation of x or y in the alu, am I wrong somewhere with that?
On Fri, May 28, 2021 at 10:34 PM WBahn [via Nand2Tetris Questions and Answers Forum] <
[hidden email]> wrote:
I thought I had replied to this the day you posted it. Apparently not. My apologies.
I need to see more of your code to have a chance of seeing what is going on.
When you say you are getting zero, do you mean that regardless of what the value of x is that you are getting a value of zero for out?
What are you using this for? You don't need anything like this for the ALU.
--