Professional Documents
Culture Documents
Number System Lecture2023
Number System Lecture2023
1623 9 Binary
3 66
6 721 3355 273211 5 3
935 Conversion
5233441275397 935
2 7
34
1 3 7 5 23 4
45 1
1
145
01 1 00
1 1
0 0 01
1 01 0 001
0
1 01011 10
100
0
010 1101 001 10
1 0 0 1 1101 11
1
001 00100 10 0
0 1 0
1
0
1 0 00101
011
01 110 0
0
1
110 001 001 111101
Binary-to-Decimal 110 011
01 00 1
Conversion 11 01011 1 01 01 1
0 1 11 00100
0 1
1 0 01 0 1
0 011 1
1001101 0 011 00101
1 1
00
1 0100
Meestrellado03/16/23
NUMBER SYSTEM
2
NUMBER SYSTEM
A number system defines how a
number can be represented using
distinct symbols.
meestrellado#7/23/15
A number can be represented
differently in different systems.
3
CONVERSION AMONG BASES
The possibilities:
Decimal Octal
Binary Hexadecimal
pp. 40-
46
DECIMAL, BINARY, OCTAL, AND HEX
Decimal is the number system that we use
Binary is a number system that computers use
meestrellado#7/23/15
Octalis a number system that represents
groups of binary numbers (binary shorthand).
Hexadecimal (Hex) is a number system that
represents groups of binary numbers (binary
shorthand). Hex is primarily used in computing
as the most common form of expressing a
human-readable string representation of a
byte (group of 8 bits). 1 byte = 1 char
5
DECIMAL
The number system we are familiar with
Decimal number has base 10
meestrellado#7/23/15
Each digit is a number from 0 to 9
0 1 2 3 4 5 6 7 8 9
6
BINARY
Binary number has base 2
Each digit is one of two numbers: 0 and 1
meestrellado#7/23/15
Each digit is called a bit
7
OCTAL
Octal number has base 8
Each digit is a number from 0 to 7
meestrellado#7/23/15
Each digit represents 3 binary bits
8
HEXADECIMAL
Hexadecimal number has base 16
Each digit is a number from 0 to 15: digits 0 to 9,
meestrellado#7/23/15
and the digits 10 through 15 are represented by A
through F
A = 10
B = 11
C = 12
D = 13
E = 14
F = 15
9
Each digit represents 4 binary bits
DECIMAL TO BINARY
Decimal Octal
Binary Hexadecimal
DECIMAL ‒TO‒ BINARY CONVERSION
The Process : Successive Division
a) Divide the Decimal Number by 2; the 1st
remainder is theLeast Significant Bit (LSB)
of Binary Number .
11
b) If the quotient is zero, the conversion is
complete; else repeat step (a) using the
quotient of the Decimal Number. The new
remainder is the next most significant bit,
and the last remainder is the Most
Significant Bit (MSB) of the Binary Number.
DECIMAL ‒TO‒ BINARY CONVERSION
12
3
2 6 r 0 Least Significant Bit
1
2 3 r 1
0
2 1 r 1 Most Significant Bit
DEC → BINARY : EXAMPLE #2
13
into its binary equivalent.
SOLUTION : EXAMPLE #2
13
2 26 r 0 LSB 2610 = 110102
14
6
2 13 r 1
3
2 6 r 0
1
2 3 r 1
0
2 1 r 1 MSB
DEC → BINARY : EXAMPLE #3
15
its binary equivalent.
SOLUTION : EXAMPLE #3
20
2 41 r 1 LSB 4110 = 1010012
16
10
2 20 r 0
5
2 10 r 0
2
2 5 r 1
1
2 2 r 0
0
2 1 r 1 MSB
meestrellado#7/23/13
17
BINARY TO DECIMAL
WHY BINARY
SYSTEM?
Computers are made of a series of switches
Each switch has two states: ON or OFF
Each state can be represented by a number
– 1 for “ON” and 0 for “OFF”
18
BINARY → DEC : EXAMPLE #2
Example:
Convert the binary number 100102 into its decimal equivalent.
19
Solution: 100102 = 1810
1 0 0 1 0
ON OFF OFF ON OFF
24 23 22 21 20
16 8 4 2 1
16 + 0 + 0 + 2 + 0 = 1810
BINARY → DEC : EXAMPLE #2
Example:
Convert the binary number 100102 into its decimal equivalent.
20
Solution: 100102 = 1810
1 0 0 1 0
ON OFF OFF ON OFF
24 23 22 21 20
16 8 4 2 1
16 + 0 + 0 + 2 + 0 = 1810
Converting Base-2 to Base-10
(1 0 0 1 1)2
OFF
OFF
ON/OFF
ON
ON
ON
Exponent: 24 23 22 21 20
Calculation:16 0 0 2 1
+ + + + =
(19)10
21
2 =1 ?
0
meestrellado#7/23/13
22
CONVERT THE FF FROM DECIMAL TO
BINARY
BINARY TO DECIMAL:
SHOW THE PROCESS
a) 1310 = ? f) 10101102
23
b) 2210 = ? G) 11101112
c) 4310 = ? H) 10001112
d) 15810 = ?
meestrellado#7/23/13
24
REFERENCES: