Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department Digital Logic Design Lab. ESGD2101 Wednesday, 30 th January 2008 Lab. 1 Number Systems
1- Decimal Number: [Base10], * Integer Number:[0,1,2,3,………..9] Example:- [23] 10 =3× × 10 1 =3 × 1+2 × 10 =3+20= 23 Number Systems
Decimal Number *Float Number: [16. 15] Integer partfloat part Decimal Point Example:- [16.15] 16.15=6* * * *10 -2 = =16.15 … …..Decimal Point Number Systems
2. Binary Numbers: [Base 2],[ 0,1] ex:- 00,01,10,11 Decimal Binary Number Systems
2-1 Binary to Decimal Conversion: Example:- [ ] MSBLSB Most significant BIT Least Significant Bit Number Systems
2-1 Binary to Decimal Conversion: Example:- For integer numbers, [ ] 2 = [ ? ] [ ] 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
Number Systems 2-1 Binary to Decimal Conversion: Example:- For float numbers, [10.111] 2 = [ ? ] [10.111] 2 =0×2 0 +1×2 1 +1× × ×2 -3 =[2.875] 10 Note: MSB & LSB just for integer part. Binary point
Number Systems 2-1 Binary to Decimal Conversion: Example:- [1011] 2 = [ ? ] [1011] 2 =1×2 0 +1×2 1 +0×2 2 +1×2 3 =[11] 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
Binary Decimal Number Systems The Truth Table Decimal to Binary Conversion:
Number Systems Decimal to Binary Conversion: The Division: [198] 10 = [ ? ] 2 By using the division system: Carrier
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
Number Systems 3-2 Decimal to Octal Conversion: The Division: [359] 10 = [ ? ] 8 By using the division system: Carrier
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 = (65) 8 {{ 65
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 (13) 8 = (001011) 2
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:- [ ] 2 = [ ? ] 16 Here we will take 4 bits and convert it from binary to decimal by using the decimal to binary truth table: {{{{ CA75 Then, [ ] 2 = [CA57] 16
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 = [ ]
Number Systems 4-3 Hexa Decimal to Decimal Conversion: Example:- [B2F8] 16 = [ ? ] 10 =8×16 0 +F× ×16 2 +B×16 3 =[45816] 10 Where, B=11, and F=15
Number Systems 4-4 Decimal to Hexa Decimal Conversion: Example:- [650] 10 = [ ? ] 16 By using the division system: Carrier A8 2