3.5.4.1 Binary Number System: Unsigned Binary. Flashcards
How does a computer recognise whether binary is signed or unsigned?
It cant, the computer has to be told whether a number is signed or unsigned.
How to convert an unsigned number to decimal.
If the number, 1011, was unsigned, it could be converted to decimal by assigning place values to each of the digits and adding up the total values under which a 1 falls, resulting in the decimal value 11..
How to convert an unsigned number to decimal.
If the number, 1011, was unsigned, it could be converted to decimal by assigning place values to each of the digits and adding up the total values under which a 1 falls, resulting in the decimal value 11..
What does the range of numbers that can be represented by unsigned binary numbers depend on?
The number of bits available.
What can be represented with one bit?
The decimal numbers 0 and 1.
What can be represented with two bits?
0, 1, 2 and 3.
What is the pattern to the range of numbers that can be represented by any number of bits?
There is a pattern to the range that can be represented by any number of bits. For n bits there are 2^n possible permutations of the bits, giving a range of decimal numbers from 0 to 2^n - 1.
What can be represented with eight bits?
The decimal numbers 0 to 255 (= 2^n - 1) can be represented.
Prove the statement that “The maximum and minimum values which can be stored, using unsigned binary, in n bits is 0 and 2^n - 1 respectively”.
Example: for 8 bits, the range of values is 0-255.
Under a binary weighting line of 1-128 if you place 0’s under each header the minimum equal value is 0. If you place 1’s under each header the maximum resulting value is 255.
The most significant bit for 8 bits is 128.
256 is double 128 (and if we had an extra column on the left, the binary weighting line would go from 1-256).
However, we mustn’t forget in binary that as zero is considered a positive number, we must include this in our list.
So we can store 256 values (including 0) but the highest positive value is 256-1 = 255 (2^n - 1).
What is the difference between signed and unsigned binary?
Unsigned binary can only represent positive numbers. Signed binary allows for the representation of negative numbers using binary.