Chapter 4 Flashcards
Explain sign and magnitude representation.
One bit represents the sign. 0 is positive, 1 is negative and the other bits represent magnitude.
What are the problems with sign and magnitude method?
There exists both +0 and -0
Requires extra logic circuits for analysing sign bits
Requires separate adder and subtractor.
How is a number converted from unsigned binary to 2’s complement?
Invert all bits and add 1.
How is a number converted from 2’s complement to signed binary?
Invert all bits and add 1
If we have n bits to represent numbers what range of positive and negative can we represent using 2’s complement.
[-(2^n/2) , (2^n/2) - 1]
T or F. In 2’s complement of the MSB is 0 then positive, else negative.
True.
How can overflow be detected in 2’s complement?
If the carry in to the MSB is different from the carry out.
How many bits do we need to add two n bit numbers without worrying about overflow?
n + 1
How many bits do we need to multiply two n bit numbers without worrying about overflow?
2n
How is negative multiplication done?
When multiplying n bit negative by n bit need to add n 1’s to start of 1st number.
How does binary long division work?
Subtract to get remainder and number of subtractions which is either 1 or 0 is part of answer.
What does radix mean?
Base
Explain how to convert binary real to real decimal.
Convert left-hand side of decimal as normal.
Right-hand side = 2^-1 + 2^-2 + 2^-4 + … + 2^-x
Explain how to convert real decimal to binary real.
Convert left-hand side of decimal as normal.
Right-hand side:
Repeatedly multiply by 2, extract any integer part generated, than re-write the integer parts top down.
Convert 0.3125 (10) into binary.
0.3125 * 2 = 0.625
Integer Part: 0
0.625 * 2 = 1.25
Integer Part: 1
0.25 * 2 = 0.5
Integer Part: 0
0.5 * 2 = 1
Integer Part: 1
Therefore; 0.3125 (10) = 0.0101 (2)