Presentation is loading. Please wait.

Presentation is loading. Please wait.

Assignment 4 Sample problems. Convert the following decimal numbers to binary. 8 920.

Similar presentations


Presentation on theme: "Assignment 4 Sample problems. Convert the following decimal numbers to binary. 8 920."— Presentation transcript:

1 Assignment 4 Sample problems

2 Convert the following decimal numbers to binary. 8 920

3 Convert the following decimal numbers to binary. 8 =>1000 920 =>1110011000

4 How can we get ? 8 => 8*1= 2 3 =>1000 920 =>512*1+256*1+128*1+16*1+8*1 => 2 9 +2 8 +2 7 +2 4 +2 3 =>1110011000

5 Convert the following Binary numbers to Decimal. 110100 100110011

6 Convert the following Binary numbers to Decimal. 110100 =>52 100110011 =>307

7 How can we get ? 110100 => 1* 2 5 +1*2 4 +1*2 2 =52 100110011 =>1* 2 8 +1*2 5 +1* 2 4 +1* 2 1 +1* 2 0 = 307

8 Add the following binary numbers. Express your answers in binary. 101+011=? 11010+10001=?

9 Add the following binary numbers. Express your answers in binary. 101+011=1000 11010+10001=101011

10 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

11 Subtract the following binary numbers. Express your answers in binary. 101-001=? 11010-01001=?

12 Subtract the following binary numbers. Express your answers in binary. 101-001=100 11010-01001=10001

13 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

14 Is this statement True or False? If I have an 8-bit system, 10111001 + 00110000 will result in overflow.

15 Is this statement True or False? If I have an 8-bit system, 10111001 + 00110000 will result in overflow. False

16 How can we get ? 1.10111001 + 00110000  10111001 + 00110000  11101001 The result is still 8-bit, so the answer is False

17 Provide the two's complement of the following 8-bit numbers. 01001110 10010010

18 Provide the two's complement of the following 8-bit numbers. 01001110 => 10110010 10010010 => 01101110

19 How can we get ? 1: 01001110 => 10110001 (invert bits) + 00000001 (add one) => 10110010 2: 10010010 => 01101101 (invert bits) + 00000001 (add one) => 01101110

20 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

21 Fill in the table with True or False where appropriate. Time Step (sec) ABNew ANew B 0False TrueFalse 1TrueFalse 2 3

22 Fill in the table with True or False where appropriate. Time Step (sec) ABNew ANew B 0False TrueFalse 1TrueFalse 2 TrueFalse 3TrueFalse

23 The “period” of a pattern is the number of steps it takes before the pattern repeats. What is the period of this pattern?

24 2


Download ppt "Assignment 4 Sample problems. Convert the following decimal numbers to binary. 8 920."

Similar presentations


Ads by Google