Binary Conversion Problems and Solutions
240 likes | 347 Vues
Convert decimal numbers to binary, convert binary numbers to decimal, perform binary addition and subtraction. Understand two's complement. Solve and explain binary arithmetic problems step by step.
Binary Conversion Problems and Solutions
E N D
Presentation Transcript
Convert the following decimal numbers to binary. 8 =>1000 920 =>1110011000
How can we get ? 8 => 8*1= 23 =>1000 920 =>512*1+256*1+128*1+16*1+8*1 => 29 +28 +27 +24 +23 =>1110011000
Convert the following Binary numbers to Decimal. 110100 100110011
Convert the following Binary numbers to Decimal. 110100 =>52 100110011 =>307
How can we get ? 110100 => 1* 25 +1*24 +1*22 =52 100110011 =>1* 28 +1*25 +1* 24+1* 21+1* 20 = 307
Add the following binary numbers. Express your answers in binary. 101+011=? 11010+10001=?
Add the following binary numbers. Express your answers in binary. 101+011=1000 11010+10001=101011
How can we get ? 101+011 => 1 0 1 + 0 1 1 => 1 0 0 0 11010+10001 => 1 1 0 1 0 + 1 0 0 0 1 => 1 0 1 0 1 1
Subtract the following binary numbers. Express your answers in binary. 101-001=? 11010-01001=?
Subtract the following binary numbers. Express your answers in binary. 101-001=100 11010-01001=10001
How can we get ? 101-001 => 1 0 1 - 0 0 1 => 1 0 0 11010-01001 => 1 1 0 1 0 - 0 1 0 0 1 => 1 0 0 0 1
Is this statement True or False? If I have an 8-bit system, 10111001 + 00110000 will result in overflow.
Is this statement True or False? If I have an 8-bit system, 10111001 + 00110000 will result in overflow. False
How can we get ? • 10111001 + 00110000 • 10111001 + 00110000 • 11101001 The result is still 8-bit, so the answer is False
Provide the two's complement of the following 8-bit numbers. 01001110 10010010
Provide the two's complement of the following 8-bit numbers. 01001110 => 10110010 10010010 => 01101110
How can we get ? 1: 01001110 => 10110001 (invert bits) + 00000001 (add one) => 10110010 2: 10010010 => 01101101 (invert bits) + 00000001 (add one) => 01101110
Consider the Christmas lights circuit (with states) described in class. Let these be the expressions for the next states. • A: not A • B: A and B
The “period” of a pattern is the number of steps it takes before the pattern repeats. What is the period of this pattern?
The “period” of a pattern is the number of steps it takes before the pattern repeats. What is the period of this pattern? 2