Numbering System 1
Numbering System 1
net/publication/343361645
CITATIONS READS
0 1,644
1 author:
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Correlation between Cumulative Exposure to Lead Metal with Obesity and Related Conditions such Diabetic and Hypertention View project
Computer Vision and Image Analysis, Understanding and Processing View project
All content following this page was uploaded by Qasim Mohammed Hussein on 01 August 2020.
Numbering system
Objective
Understand the decimal, binary, octal and
hexadecimal number systems.
Convert from one number system into another.
Apply arithmetic operations to binary numbers.
Understand binary codes and alpha numeric codes.
Page 2
Chapter 1: Numbering system
Page 3
Chapter 1: Numbering system
Page 4
Chapter 1: Numbering system
Page 5
Chapter 1: Numbering system
Page 6
Chapter 1: Numbering system
Page 7
Chapter 1: Numbering system
Page 8
Chapter 1: Numbering system
Page 9
Chapter 1: Numbering system
Page 10
Chapter 1: Numbering system
0
Remember the mathematical rule that n = 1, or any
number raised to the zero power is equal to 1. The
value of decimal number is calculated as follow:
a) (1010.01)2
b) (24)8
c) (1A2)16
Solution
a) The weight of each digit :23 22 21 20 2-1 2-2
Binary number :1 0 1 0 . 0 1
(1010.01)2 =8 + 0 + 2+ 0 + 0 + 0.25
= (10.25) 10
b) (27.3)8 = 2 x 81 + 7 x 80 + 3 x (1/8)
= 2x8 + 7x1 + 3x0.125
= 16 + 7 + o.375
= (23.375)10
c) (1A2)16 = 1x162 + 10x161 + 2x160
= 1x256 + 10 x 16 +2
= 256 + 160 + 2 = (418)10
The binary system is the simplest system, so it can be
converted to decimal number by a waiting number. The
weight or value of a binar digit increses from right to
left by a power of 2. The right most bit is the least
significant bit (LSB) in binary number has a weight of
0
2 =1.
Page 12
Chapter 1: Numbering system
Page 13
Chapter 1: Numbering system
Page 14
Chapter 1: Numbering system
Example A9:
Convert the binary number (10011101101.10101001)2
to hexadecimal number?
Page 15
Chapter 1: Numbering system
Page 16
Chapter 1: Numbering system
Octal Weight
digit 4 2 1
2 0 1 0
7 1 1 1
0 0 0 0
1 0 0 1
4 1 0 0
(2701.4)8 = (010111000001.100)2
Page 17
Chapter 1: Numbering system
Page 18
Chapter 1: Numbering system
Solution
Hexadecimal number: E 2 7 . 9
Four bit for each digit: 1110 0010 0111 . 1001
Binary number : 111000100111.1001
Divide into 3 bits groups: 111 000 100 111.100 100
Value of each group : 7 0 4 7 4 4
Octal number : (7047.44)8
Example A15: Convert (5B1.7)16 to octal number?
Solution
(5B1.7) 16 = (010110110001.0111)2
=(010110110001.0111)2
= (2661.34)8
Page 19
Chapter 1: Numbering system
Page 20
Chapter 1: Numbering system
Page 21
Chapter 1: Numbering system
Page 22
Chapter 1: Numbering system
3. Binary Arithmetic
Arithmetic operations with number in numbering
system with base r have the same rules in decimal
numbers.
1.3.1 Binary Addition
The binary addition is performed by using the
following the binary table.
0 + 0 = 0 Sum = 0, carry = 0
0+1=1 Sum = 1, carry =0
1+0=1 Sum = 1, carry =0
1+1=0 Sum = 0, carry =1
The carry is found in the same way as in decimal
operation. Since the 1 is the largest digit in the system
of binary. If the sum is greater than 1 need that a digit
be considered overflow, therefore is divided by the
base.
Example A17: Perform the following addition in
binary numbering system?
a) (111)2 + (110)2
b) (1010)2 + (1101)2
c) (11.01)2 + (101.11)2
Page 23
Chapter 1: Numbering system
Solution
11 1 111 1 Carry
111 1010 11.01
110 1101 101.11
------- ------- ----------
1001 10111 1001.00
Page 24
Chapter 1: Numbering system
Page 25
Chapter 1: Numbering system
b)
Page 26
Chapter 1: Numbering system
1.4. Complements
Complements are used in digital computer for
simplifying the subtraction operations and for logical
manipulations. By the complements, the subtraction of
Page 27
Chapter 1: Numbering system
Solution
Example A23:
Find the (r-1)'s complement for the numbers
(1001010)2, (3982)10, (4530)8, (6BE00)16?
Page 29
Chapter 1: Numbering system
Solution
Page 30
Chapter 1: Numbering system
Page 31
Chapter 1: Numbering system
Page 32
Chapter 1: Numbering system
Page 33
Chapter 1: Numbering system
n
3. Using the form r – N for N ≠ 0, and 0 for N=0.
Where n is the number of digits.
Page 34
Chapter 1: Numbering system
Page 35
Chapter 1: Numbering system
Solution
Page 37
Chapter 1: Numbering system
Page 38
Chapter 1: Numbering system
Page 39
Chapter 1: Numbering system
Page 40
Chapter 1: Numbering system
Page 41
Chapter 1: Numbering system
Page 42
Chapter 1: Numbering system
Solution
(a) (193)10 = (11000001)2
(b) (193)10 = (0001 1001 0011) in BCD code.
(c) (193)10 = (0100 1100 0110) in excess-3 code.
(d) (193)10 = (0111 1111 0101) in 8,4,-2,-1 code.
Addition in BCD
To add two BCD codes, use the following steps:
1. Add the two BCD numbers like addition in binary
system rules.
2. If the fourth digit, MSB, is less or equal to 9, it is a
accepted in BCD code.
3. If the fourth digit, MSB, is greater than 9, or a carry
out of the fourth digit, it is an unaccepted in BCD
code. We add 6 (0110) to the sum of addition
operation in order to skip the six invalid codes and
return the code to the weight 8,4,2,1. If a carry
results when 6 is added, add the carry to the next
group.
Page 43
Chapter 1: Numbering system
b) 0011 0101 35
0010 0010 + 22 +
0101 0111 Valid in BCD code 57
c) (1001) + (1000)
1001 9
1000 + 8+
1 0001 Invalid because carry 17
0110 + Add 6
0001 0111
1 7
Page 44
Chapter 1: Numbering system
1000 0111 87
0101 0011 + 53 +
1101 1010 Invalid both group (>9) 140
Page 45
Chapter 1: Numbering system
Table A3
Decimal Binary Gray
0 000 000
1 001 001
2 010 011
3 011 010
4 100 110
5 101 111
6 110 101
7 111 100
Solution :
E01.[0
Page 47
Chapter 1: Numbering system
Solution:
Binary number: 1 0 0 0 0 1
Solution:
Solution
Binary number: 1 0 1 0 0 1 1
Gray code :1 1 1 1 0 10
Solution
Page 49
Chapter 1: Numbering system
Page 50
Chapter 1: Numbering system
Page 51