# Confusion

7 messages
Open this post in threaded view
|

## Confusion

 Hi. I am creating a visual diagram of the Hack ALU. Ive gotter pretty far. Im lost though when it comes to the output ng. Im not sure just exactly what a lesser than zero is. How do I connect 16 output and make a lesser than zero. Any suggestions?
Open this post in threaded view
|

## Re: Confusion

 Administrator Let's say that I have the following 16-bit values: 0100010101001010 1110010100111101 0000010111101011 1111110111011100 1000000000000011 0000000000000000 1111111111111111 1111110000010111 0000000111101011 0111111111111111 Which of them are negative (strictly less than zero)? How did you decide which are negative and which are not?
Open this post in threaded view
|

## Re: Confusion

 In reply to this post by Dan1984mor2017 Look at how negative numbers are stored in 2's complement.  there is a bit that tells you if the number is < 0. hopefully that's all the hint you need....
Open this post in threaded view
|

## Re: Confusion

 In reply to this post by WBahn I think based on two's complement that it depends on the bit six like 16. So if their was only two bit the first two 00, 01 would be positive and the other would be negative. I suppose it is just like flipping the values. 10 would be negetive two. And 11 would be negetive one.
Open this post in threaded view
|

## Re: Confusion

 Thanks for the hint. I understand. I'm going to try to make a cup that will divide amongs the bits. Seems a little challenging. For 16 almost seems impossible. Especially being one output. Maybe I can just divide it. Im am going to start there.