Binary Flashcards
What are the 2 methods of representing negative numbers in binary
Sign and magnitude
Twos compliment
What does MSB stand for
Most significant bit: the leftmost bit
How is a negative represented using sign and magnitude
The MSB represents the sign of the number
When using sign and magnitude what would a zero as the first bit represent
A positive number
Describe twos compliment for representing negative binary values
The MSB represents a negative value
Describe how to swap the sign of a number using twos complement
Starting on the right copy each of the bits until you reach the first 1
After this swap every 1 for a 0 and every 0 for a 1
Describe how to subtract binary values using twos complement
Swap the sign of the second value and perform a binary addition