Presentation is loading. Please wait.

Presentation is loading. Please wait.

Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.

Similar presentations


Presentation on theme: "Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department."— Presentation transcript:

1 Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department Digital Logic Design ESGD2201 Wednesday, 10 th September 2008 Lecture 2 Number Systems

2 1. Decimal Number 2. Binary Numbers 2.1 Binary to Decimal Conversion 2.2 Decimal to Binary Conversion 3. Octal Numbers 3.1 Octal to Decimal Conversion 3.2 Decimal to Octal Conversion 3.3 Binary to Octal Conversion 3.4 Octal to Binary Conversion 4. Hexa Decimal Numbers 4.1 Binary to Hexa Decimal Conversion 4.2 Hexa Decimal to Binary Conversion 4.3 Hexa Decimal to Decimal Conversion 4.4 Decimal to Hexa Decimal Conversion Agenda

3 1- Decimal Number: [Base10], * Integer Number:[0,1,2,3,………..9] Example:- [23] 10 =3×10 0 +2 × 10 1 =3 × 1+2 × 10 =3+20= 23 Number Systems

4 Decimal Number *Float Number: [16. 15] Integer partfloat part Decimal Point Example:- [16.15] 16.15=6*10 0 +1*10 1 +1*10 -1 +5*10 -2 =6 + 10 + 0.1 + 0.05 =16.15 …..10 4 10 3 10 2 10 1. 10 -1 10 -2 10 -3 10 -4 …..Decimal Point Number Systems

5 2. Binary Numbers: [Base 2],[ 0,1] ex:- 00,01,10,11 Decimal Binary Number Systems 000 101 210 311

6 2-1 Binary to Decimal Conversion: Example:- [1101101] 2 1101101 MSBLSB Most significant BIT Least Significant Bit Number Systems

7 2-1 Binary to Decimal Conversion: Example:- For integer numbers, [1101101] 2 = [ ? ] 10 1101101 2 6 2 5 2 4 2 3 2 2 2 1 2 0 [1101101] 2 =1×2 0 +0×2 1 +1×2 2 +1×2 3 +0×2 4 +1×2 5 +1×2 6 =[109] 10 MSBLSB

8 Number Systems 2-1 Binary to Decimal Conversion: Example:- For float numbers, [10.111] 2 = [ ? ] 10 10.111 2 1 2 0 2 -1 2 -2 2 -3 [10.111] 2 =0×2 0 +1×2 1 +1×2 -1 +1×2 -2 +1×2 -3 =[2.875] 10 Note: MSB & LSB just for integer part. Binary point

9 Number Systems 2-1 Binary to Decimal Conversion: Example:- [1011] 2 = [ ? ] 10 1011 2 3 2 2 2 1 2 0 [1011] 2 =1×2 0 +1×2 1 +0×2 2 +1×2 3 =[11] 10

10 Number Systems 2-2 Decimal to Binary Conversion: There are two ways to convert the decimal numbers to binary numbers. 1.By using the Truth Table: we can use the truth table for small decimal numbers, but for large decimal numbers it will be more difficult. 2.So, we will use the division: which we can use it for small and large decimal numbers

11 Binary 2 3 2 2 2 1 2 0 Decimal 0 0 0 0 0 0 11 0 0 1 02 0 0 1 13 0 1 0 04 0 1 5 0 1 1 06 0 1 1 17 1 0 0 08 1 0 0 19 1 0 1 0 1 111 1 1 0 012 1 1 0 113 1 1 1 014 1 1 15 Number Systems The Truth Table Decimal to Binary Conversion:

12 Number Systems Decimal to Binary Conversion: The Division: [198] 10 = [ ? ] 2 By using the division system: 0 1 1 0 0 0 1 1 011 00011 Carrier

13 Number Systems Decimal to Binary Conversion: The Division: For float numbers, [0.3125] 10 = [ ? ] 2 By using the multiplication system: 0 1 0 1. 0 01 1 Carrier 0.3125 × 2 = 0.625 0.625 × 2 = 1.25 1.25 × 2 = 0.5 0.5 × 2 = 1.00 Continuo to the desired number of decimal places or stop when fractional part is all zero MSB LSB

14 3. Octal Numbers: [Base 8],[ 0,1,3,4,5,6,7] Number Systems 3-1 Octal to Decimal Conversion: Example:- [2374] 8 = [ ? ] 10 =4×8 0 +7×8 1 +3×8 2 +2×8 3 =[1276] 10

15 Number Systems 3-2 Decimal to Octal Conversion: The Division: [359] 10 = [ ? ] 8 By using the division system: 7 4 5 74 5 Carrier

16 Number Systems 3-3 Binary to Octal Conversion: Example:- [110101] 2 = [ ? ] 8 Here we will take 3 bits and convert it from binary to decimal by using the decimal to binary truth table: BinaryDecimal 1106 1015 1 1 01 0 1= (65) 8 {{ 65

17 Number Systems 3-4 Octal to Binary Conversion: Example:- [13] 8 = [ ? ] 2 Here we will convert each decimal digit from decimal to binary (3 bits) using the decimal to binary truth table: BinaryDecimal 1001 3011 (13) 8 = (001011) 2

18 4. Hexa Decimal Numbers: [Base 16],[ 0,1,3,4,5,6,7,8,9,A,B,C,D,E,F] Number Systems 4-1 Binary to Hexa Decimal Conversion: Example:- [1100101001010111] 2 = [ ? ] 16 Here we will take 4 bits and convert it from binary to decimal by using the decimal to binary truth table: 1100101001010111 {{{{ CA75 Then, [1100101001010111] 2 = [CA57] 16

19 Number Systems 4-2 Hexa Decimal to Binary Conversion: Example:- [DE27] 16 = [ ? ] 2 Here we will convert each Hexa decimal digit from decimal to binary (4 bits) using the decimal to binary truth table: DE72 Then, [DE27] 16 = [1101111000100111] 2 1101111000100111

20 Number Systems 4-3 Hexa Decimal to Decimal Conversion: Example:- [B2F8] 16 = [ ? ] 10 =8×16 0 +F×16 1 +2×16 2 +B×16 3 =[45816] 10 Where, B=11, and F=15

21 Number Systems 4-4 Decimal to Hexa Decimal Conversion: Example:- [650] 10 = [ ? ] 16 By using the division system: 10 8 2 Carrier A8 2


Download ppt "Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department."

Similar presentations


Ads by Google