3.5.4.3 Signed Binary using Two's Compliment. Flashcards
What is a Real Number?
A number with a fractional part.
What condition must be met in order for the CPU to process data?
The data must be in binary format.
What is the use of binary fractions?
Binary fractions are used to represent a fractional part of a binary number.
If we are using binary to represent numbers, how do we show positive and negative?
We use the leftmost bit:
1 = negative.
0 = positive.
This is also known as the MSB (most significant bit).
What is purpose of Two’s Compliment?
To convert a negative number into binary for addition purposes, this is the standard method.
Outline the process of Two’s compliment.
1) Find the positive equivalent of the negative number in binary.
2) Write the number, starting at the right and working to the left, up to and including the first 1.
3) Change all the 0’s and 1’ and vice versa as you move to the left.
What values does the range of a two’s compliment include?
Given a certain number of bits, the range of a two’s compliment includes both positive and negative value.
For example, with four bits the largest positive value that can be represented is 7 and the most negative number that can be represented is -8.
0 1 1 1
more generally, with n bits, the range of a two’s complement signed with binary number is from 2^n-1 - 1 to 2^n-1.