Download presentation
Presentation is loading. Please wait.
1
Course Code 114 Introduction to Computer Science
Lecture 3 Number Systems and Conversions Assoc. Prof. Hussam Elbehiery Egypt 2018
4
Digital and Analogue Two types of light control found in our homes: light switches and light dimmers. A mercury thermometer is an analogue device since the mercury can creep up the tube reaching all values in turn. Calendar is a digital device.
5
Digital system Vs. Binary systems
A digital system (not analogue) that has only two states is called a 'binary' system. Digital electronics for control or decision-making circuits called 'logic circuits and the 1 and 0 conditions logic states.
6
Decimal system Base 10 numbering system.
“123”, How many items this value represents. The number 123 represents: 1* * *100 or “ ” 1* * * *10–1 + 5*10–2 + 6*10–3
7
Binary Numbering System
Most modern digital systems operate using binary logic. The digital systems represent values using two voltage levels (usually 0 v and +5 v).
8
Binary to Decimal Conversion
1*23 + 0*22 + 1*21 + 0*20 = = 1010
9
Decimal to Binary Conversion
Our final number is (10011)2
10
Binary Formats An eight-bit binary value uses bits 0 through 7:
X7 X6 X5 X4 X3 X2 X1 X0 A 16-bit binary value uses bit positions 0 through 15: X15 X14 X13 X12 X11 X10 X9 X8 X7 X6 X5 X4 X3 X2 X1 X0
11
Bits: The smallest “unit” of data on a binary computer or digital system is a single bit. Bit, an abbreviation for Binary Digit. Nibbles: A nibble is a collection of four bits. Bytes: A group of eight bits is called a byte.
12
Word: A word is a group of 16 bits.
Double Word: D Word is a group of 32 bits.
13
Octal Numbering System
The octal number system uses base 8 instead of base 10 or base 2. 8 digits at our disposal, 0–7. To convert 172 in octal to decimal: Weight = 1*82 + 7*81 + 2*80 = 1*64 + 7*8 + 2*1 = = 12210
14
122/8 = 15 remainder 2 15/8 = 1 remainder 7 1/8 = 0 remainder 1 = 1728
Octal Binary
15
Hexadecimal Numbering System
The hexadecimal numbering system is the most common system seen today in representing raw computer data. Represent groups of 4 bits. We have 16 symbols to use for digits The digits used in hex are the letters A, B, C, D, E, and F.
16
Decimal Binary Hexadecimal
A B C D E F
17
To convert 15E in hex to decimal:
Weight = 1* * *160 = 1* * *1 = = 350/16 = 21 remainder 14 = E /16 = 1 remainder 5 1/16 = 0 remainder 1 So we get 15E for 350.
18
To convert AE to binary:
So AE in binary is
19
Assoc. Prof. Hussam Elbehiery
Thank you With all my best wishes Assoc. Prof. Hussam Elbehiery
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.