Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE 102 Introduction to Computer Engineering

Similar presentations


Presentation on theme: "CSE 102 Introduction to Computer Engineering"— Presentation transcript:

1 CSE 102 Introduction to Computer Engineering
Number System

2 Number Systems Binary numbers (Base 2): 0,1
Octal numbers (Base 8): 0,1,2,3,4,5,6,7 Decimal numbers (Base 10): 0,1,2,3,4,5,6,7,8,9 Hexadecimal numbers (Base 16): 0,1,2,3,4,5,6,7,8, 9,A,B,C,D,E,F

3 Decimal to Binary Conversion
(102)10 = (?)2 = ( )2 Divide by 2 Remainder 102 2 51 25 1 12 6 3

4 Decimal to Binary Conversion
(0.125)10 = (?)2 = (0.001)2 Multiply by 2 Integer part 0.125 2 0.25 0.5 1.0 1

5 Decimal to Binary Conversion
Multiply by 2 Integer part 0.4 2 0.8 1.6 1 1.2 (0.4)10 = (?)2 = ( )2 = (0.0110)2

6 Binary to Octal and Hexadecimal Conversion
( )2 = (146)8 Hexadecimal ( )2 = (?)16 ( )2 = (66)16 6 6

7 Binary to Octal and Hexadecimal Conversion
( )2 = (0.314)8 Hexadecimal ( )2 = (?)16 ( )2 = (66)16

8 Representation of Integers
Signed-magnitude representation 2’s complement representation

9 Signed-magnitude Representation
sign bit 0-positive 1-negative integer Ex:

10 2’s complement Representation
To find 1’s complement of a binary number change 1s to 0s and 0s to 1s To find 2’s complement of a number add 1 to its 1’s complement Ex: (102)10 = ( )2 1’s complement: 2’s complement:

11 2’s complement Representation
Ex: +10210 -10210


Download ppt "CSE 102 Introduction to Computer Engineering"

Similar presentations


Ads by Google