Understanding Number Systems in Electronics
Understanding Number Systems in Electronics
NUMERATION SYSTEMMS
2.1 INTRODUCTION
Anumber is a mathematical quantity used to count, measure and label. A notation
symbol that represents a number is called a numeral. In electronics, it is correlated to a physi
quantity such as voltage, current, or resistance. We are acustomed to the use and manipulati
of numbers for the many calculations used in analyzing electronic circuits. But the particul C
system ofnotation we've been taught from grade school onward is not the systemused intermd
in moderm electronic computing devices. This is both a
good and a bad thing in the study
electronics. There are many different types of
numbers as described below.
(a) Natural Numbers (N)
Counting numbers are known as naturalnumbers. Natural numbers are the most familh
numbers. The set of whole number is denoted
by 'N', which comes from the word natura
Traditionally, the sequence ofnatural numbers is started with 1. The digit 0 is not considered
natural number. The smallest natural
number is 1, but there is no largest number as it goes up
infinity.
Therefore, N= {1, 2, 3, 4, 5, 6, ... .
b)Whole Numbers (W)
All natural numbers
together with zero (0) form the set of whole numbers. The set
whole number is denoted by *W", which comes from the
word 'whole'. The sequence of
numbers is started with 0. Thus the smallest whole wh
number is zero.
Therefore, W= {0, 1, 2, 3, 4, 5, 6, .... ..}
(c) Integers (Z)
All natural numbers, zero and
thenegatives ofnatural numbers make up the integers.
set of integers is denoted by Z'. The letter Zcomes from German Zahl', meaning
There is no smallest number or
largest number in the set of integers, as it
'numoe
either direction. goes infinny
upto
Therefore,
Z={..., -3,-2,-1,0, 1,2,3, 4, 5, 6,..
(d) Rational Numbers (Q)
The
word'rational
p and q are integers and
is derived from the word
'ratio'. The numbers of the form whe
of whole number 1s u
Numeration systems 15
infinite number ofrational numbers
by Q', which comes from the word 'quotient'. We can find
k 5-6/63, 99/100
betweenany two integers. For example,we have ,
and so on between 0 and 1. These fractions are rational numbers. The word 'rational' literally
means 'reasonable'. But the meaning is not so for rational numbers.
The fractiofis, mixed fractions
and integers, all are rational numbers, not because they are 'reasonable' but because they
are
rational numbers.
(e) Irrational Numbers ()
The numbers which cannot be expressed in the form p/q, where p and q are integers and
T'. Square
q#0 are known irrational numbers. The set ofirrational numbers are represented by
roots of all positive prime numbers are irrational numbers. All non-terminating and non-repeating
decimal numbers are also irrational numbers
Therefore, Q={ not p/q, wherep and q are integers and q #0}
Example: n, V2,V3, V5, V11, 1.0012802012022435.., 1.010010001... etc
( Real Numbers (R)
The real numbers include all the measuring numbers. Every rational number is a real number.
Every irrational number is also a rational number. A decimal represents a rational number ifand
onlyifit has a finite number of digits or eventually repeats for ever, after any initial finite string
digits. The decimals neither end nor eventually repeat forever are irrational numbers. Both are
real. Every real number corresponds to a point on the number line.
g) Complex numbers (C)
The complex number consists ofall numbers ofthe form:a+jb
Where a and b are real numbers, and j is square root of-1.
Real number a is known as real part and bas imaginary part ofthe complex number a +jb.
SUMMARY
be employed to signals.
get only two states as
With our
previous knowledge, a diode ora
levelleada
The low-state can be output, ie., saturation (low transistor ca
state)
digital operation is moredesignated
and
"0". The
high-state can be designated cut-off(high state
as
reliable than as "1".
many-valued analog operation. Therefo
Numeration systemss 17
Example (square wave):
A square wave may be taken as an example to understand a digital signal.
The
as HIGH value and OV
signal can have two values only. Let the square wave have 1OV
as LOW value. The high value (10V) is
taken as "1" and the low value (0V) as "0".
Here the two voltages 10V and OV are quite distinguishable as high and
low. Remem-
ber: The exact value ofvoltage is immaterial. Had the voltages been 7V and 2.6V,
the
former would be taken as "1*" and the latter as "0".
2.2.1 COMPARISON: ANALOG vrs DIGITAL
Analog Signal Digital Signal
1. Continuously varying signal 1. Can have two discrete values
2. Can have infinite number of values 2. It is two-state operation (high/low)
3. Have any value between +10V and -10V 3. Can be either 10V or 0V
4. Analog operation less reliable 4. Digital operation more reliable
5. Example : Simusoidal voltage or current 5. Example : Square ave
+10 V
10 V
ov
-10V
2.3 DIGITALCIRCUIT
The name 'digital' come from the digits 0° and 1'.1fan electronic circuit is
then the circuit is called a digital circuit. A
designed to use only digital signal,
digital circuit gives a low' value (0) or a "high' value (1) as its output. Correspond-
ing states may be called as OFF' or 'ON' respectively. These two levels are also
designated as 'FALSE' and TRUE'. The actual voltage ranges for LOW and HIGH
levels are different for different circuits. A digital system deals with some basic
operations like AND, OR, NOT and FLIP-FLOP (to be discussed in detail later).
The basic operations are performed a number of times in case of large digital sys-
tems like digital computers.
n 2.4 NUMBER SYSTEMS FOR DIGITAL CIRCUITS
Almost all modern computers are digital computers. They can recognize only two distinct
electronic states of electrical charge. The states are identified as 0 and 1, or equivalently,false
two states,
ana true, or offand on. Since 0 and 1 are the most compact means ofrepresenting
ata is represented as sequences of 0's and l's. Sequences of O's and l's are binary numbers.
The number system with merely two digits is calleda binary system. Any number in this
system can be written with the help of0 and 1. Thus digital circuits use Binary system.
18 Digital systems
Ifwe revisit the number system we have been using in our whole and applicati
life,
number system. We are fämiliar with this number system in which we count tenthen it ie
ni
[Link] number can be written with the help ofthese 10 digits. In addition to
this
erals,
Svete
other systems are used, namely, Octal system and Hexagonal system. em,
used extensively in digital electronics as compared to the three other
However, bina
inary systes
systems.
2.4.1 DECIMAL NUMBER SYSTEM
Throughout the world, the main system of mathematical notation today is the dao:
number system, which is also called the base-10 system. The term "base"
refers to the nieAm
of distinct symbols or digits that can be found in the numerals. The word "decimal"
comes
the Latin word for "ten". In the decimal system, there are TEN
unique symbols, called die
which are 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Numerals are
sequences of one or more
di
Numerals represent quantities, called numbers. The decimal
digit placed at the extreme rig
known as least significant digit (LSB). Similarly, the decimal digit placed at the extreme le
known as most significant digit (MSB).
Decimal number system is a positional numeral [Link] is also known as Hin
Arabic number system or Arabic number system. Any number
large or small can be written
row with the
help ofthe given 10 digits with each position in the row corresponding to a cer
power of10. Each number is expressed in base 10 by using these 10 digits and letting each p.
value be a power of 10. Thus the basic units increase by powers of 10. It is believed that
decimal system is based on 10, because we have 10 fingers. These 10 fingers were used
counting early in the course of civilization. The decimal system was an important improve
over the Roman numerals, which did not usea positional system.
In this system, numeral 5349 is equal to 5 thousand, 3 hundred, 4 ten and 9 one.
Thus, 5349 5x1000 +3x100+4x10 +9x1
In exponentnotations: 5349 5 x 103 +3 x 102+4 x 10+9x 10°
Thus, in a decimal numeral each place has a specific value. The place-holder digitcontrib
accordingly to give the amount ofthe number. For example, in decimal numeral 5349, the
place from right has a specific value, i.e., 1000 or 10. The digit 5 holds this place and contribr
5000 accordingly to give the amount ofthe number 5349.
Ingeneral: D,D,D,D, =D, x10 + D, x10 + D, x10 + D, x10°
Note carefully: The subscript (3, 2, 1 and 0) matches the power of 10 by which the d
is multiplied. In other words, ifthe digit is D,, then it will be multiplied with 10. Thus the subsc
(3) of D matches with the power (3) of 10. The usual way to visualize this is by thinking ofi
positions in a number with N digits is as follows:
10N-I 10 104 103 102 10 10
D D D D D D D.
19
Numeration systems
dot is known as decimalpoint.
lt also uses a (.) to represent decimal fractions. The
dot
number take different place values depending
In this pattem. the umerals used in denoting a
in the row divides it into those powers of 10 equal to or greater
upon position. Adecimal point
10. Positions farther to the left of the
than 0 and those less than 0, i.e., negative powers of
decimal point correspond to increasing positive powers of 10 and those farther to the rightto
In a base-10 system
inereasing negative powers, i.e., to division by higher positive powers of10.
the numbers represent the sumas follows
5309 (Sx10') +
(3x 10 ) + (0x10')(9x10") =5000+300 +0+9
+
5.309 =
(5x10°) + (3x101) + (0x10) +(9x10-3) 5x1+3/10+0/100+9/1000
=
numbers. The
The decimal number system is widely used in various systems employing
metric system of weights and measures, used in most of the world, is based on
the decimal
system, as are most systems ofnational currency.
2.4.2 BINARY NUMBER SYSTEM (binary digit = bit)
The idea of decimal system can be extended to understand a binary number system. If we
take only two digits instead of 10 digits, and use base-2 instead of base-10, the number system
so obtained will be the required binary system. Thus, a binary numeral is a sequence of binary
digits. The binary representation is a little over three times as long as the decimal equivalent, on
'bi' from binary and t
average. A binary digit is called a bit. The word 'bit' coined by taking
is
from digit. Each bit position is multiplied bya power of2. For example, value ofa binary number
1101101 can be realized as follows
(1101101), = 1 x2° +1 x25+0 x 24 +1 x 23+ 1 x22+ 0 * 2 + 1 x2
= 64 + 32 + 0 + 8 + 4+ 0 +1 = 109
Note curefully: The subseript (5, 4,3, 2, 1 and 0) matches the power of 2 by which the
"binarydiit (bit) is multipliced. In other words, ifthe bit is B, then it willbe multiplied with 2. Thus
the subscript (4) ofB, matches with the power (4) of2. The procedure resembles that ofdecimal
number system. The usual wayto visualize this is by thinking of the positions in a number with N
digits is as illustrated through a tabular form in the next page.
20 Digital systems and
applicatitioNu
N-I 25 24 23 22 2
B B B B B 24
BN B
It also uses a dot (.) to represent binary fractions. In this pattern, the numeralsuse an
denoting anumber take different place values depending upon position. A point in the row divig
it into those powers of2 equal to 0 or greater than O and those less than 0, i.e., negative pomfo
[Link] the procedure in case of decimal number system. We can analyse the bingur
case in the same manner. Positions farther to the left of the point correspond to increasi
postive powers of 2 and those farther to the right to increasing negative powers, ie
division by higher positive powers of 2. Such binary numbers in a base-2 represent the sum
e
follows:
(1.101), =(1x2°)+(1x2*")+(0x2")+(1x2)
71t
1 0 1
23
1
= 1x1+*48
=1+0.5 +0+0.125
1.625 (decimal value)
=
+(1x24)
(10.1011), (1*21) + (0x2°) + (1x2-1) (0x2-)+(1*2-3)
= +
=1x2+0x1+ - t
=1x2+0xl+,*4*816
= 2+0+ 0.5 +0+ 0.125 +0.0625
= 2.6875 (decimal value)
then he/she may dou
lfsomeone feels reluctant to determine
the powers of2 each time,
Ifhe/she starts fro
represented by a sequence of bits.
a number easily to determine the value
the left, then decimal va
numeral and make doubling towards
the right hand side of the binary decimal numbers oftho
simply adding up the
or the binary numeral can be determined by 0 bits. We co-
numbers of those places having
and dropping the C
places where bit 1 exists 1000100101 as follows:
numeral
determine the decimal value ofa binary
512 T 256 128 64 32 16 8 20
0
the numbers 2, 8, 16, 64, 128,
and 256, as those plahg
we have to drop
As instructed,
add up 1,4, 32, and 512 ofthose places having
binary dI
have '0'bits. We are now ready to
1000100101 should be:
1 . Thus, decimal
value ofbinary numeral
(1000100101),
=
512+32 +4 +1
=
549 (decimal value).
Numeration systemsS 21
2.4.3 OCTALNUMBER SYSTEM
octal number system, as the
The word "octal" comes from the Latin root of "eight". The
are written using only
an 8-digit number system. All numbers in this system
i name suggests, is
e eight digits:0, 1,2,3,4,5,6, and 7. There is no or 9's. The8 position
8's weights ofplace values
are the powers ofeight, i.e., 8, 8',8, 8,8',
and so on. Therefore, any octal
n of octal system
number ( O.. O,0O,0,0,), can be evaluated as follows:
(ON.0,0,0,0,),=0x8+.. +0,x8 +0,x8+ 0x8'+0,x8
ng
to and 0) matches the power of8 by which
Note carefully: The subscript (N-1,...3,2, l
then it will be multiplied with 8.
the octal digit is multiplied. In other words,ifthe octal digit is O,,
of8. The procedure resembles that of
Thus the subscript (3) of0, matches with the power (3)
ofthe positions in a number
decimal number system. The usual way to visualize this is by thinking
with Ndigitsisas followS 82 8 80
8N-I 8 8 85
0, oo
be understood in decimal systemas:
Example: Octalnumber 734116 can
+ 1x82+ 1 x8 +6x8°
(734116), =7x85 + 3x8+ 4x83
+3x4096 +4x512 +1x64 + 1x8 + 6x1
= 7x32768
229376+12288+ 2048 +64+8+6 243790 (decimal value)
octal
used in digital electronics. It is because an
The octal number system is frequently
number. Further, the system has 8
number can be easily converted into its equivalent binary
octal numerals are shorter than their binary equivalents
enabling us to work easily with
digits. So, in digital electronics,
an amount of243790 (decimal)
shorter octal numbers. For example, to feed
On the other hand,
001 110 which is a large binarynumber.
one hasto write 111 010011 001 numerals are
734116 in octalnumber system. Thus octal
h the same amount may be fed by writing
u
shorter than therr binary equivalents.
fro 2.4.4 HEXADECIMAL NUMBER SYSTEM
valu The word "hexadecimal"
The word"hxadecimal" comes from the Latin root of "'sixteen".
hos halls of IBM. It was originally sexadecimal,
since that
took life in the early 1950's within the
e cd on
the "sex" with the Greek "hex".
is closer to pure Latin, but for evident reasons, they replaced The
name suggests, is a 16-digit
number system.
The hexadecimal number system, as the
There are only 10 digits in the decimal system.
hexadecimal number system has the base 16.
ten digits ofhexadecimal
number system. The first six letters ofthe
These are also taken first
used as the next six digits. Thus,
all the numbers in this system are written
laEnglish alphabets are
dif using sixteen symbols given as: C (12), D (13), E (14), F(15)
0, 1, 2, 3,4, 5, 6, 7, 8, 9, A(10), B(11),
22 Digitalsystems and
Here
the capital letters A, B, C, D, E and Frepresent 10, 11, 12,13, 14and applicat ICati
in hexadecimal number system. The position weights of place values of hexadee. 15r
al nmun
system are the powers of sixteen, i.e., 16', 16, 16, 16', 161, 16 and so on.
There
hexadecimal number (H. H,H, H, H),, can beevaluatedin decimalsystem stem asf
as follow
(H.H, H, H, H), =H,<16N...+ H,x16 +H,x16 +Hx16'+
Note carefully:
The subscript (N-1,.. ..,3, 2, 1, 0) matches the power of 16 by which the hexades
digit is multiplied. In other words, if the hexadecimal digit is H, then it will be multiplied with
Thus the subscript (3) ofH, matches with the power (3) of 16. The procedure still
resemblei
of decimal number system. The usual way to visualize this is by thinking ofthe
positions
number with Ndigits is as follows:
16N- 1048576 655365 4096 256 16 1
16 16 164 16 162 161 16
HN H, H, H, H, H H
(1100001100),
24 Digital systems and applica
(b) Remainder Method
atio
This method is modified presentation ofthe Double-Dabble method described en
fact, both are basically the same method. The Remainder method uses the kind ofdivision
sion
learned about in elementary school before we knew about the existence offractions, It ads.
has a name. It is called integer division. When we divide the dividend by the divisor:
actua
we
a quotient and a remainder.
Example: 3548, Remainder 3
Here Dividend = 35, Divisor =4, Quotient= 8, Remainder =3.
Similarly 1+2=0, remainder1
02-0, remainder 0
Let X be the decimal number we wish to write in binary. We should use the followi
notation for clarity.
When X is a decimal number, we should write
When Y is a binary number, we should write
If(X-(Y),, we have to find the expression for Y.
Integer Division Algorithm
1. Divide X by 2.
2. Write the remainder to the immediate left of the previous remainder
this is the first remainder right it down
lf leaving room to its leftfor more bits.
new value ofX and go back to stej
3. f the quotient is not 0, make the quotient the
Otherwise go to step 4.
is the sequence ofremnainders in left-to-right
order
4. The binary umeral (Y)
number. 2.5
Example: Convert decimal number (780),10 to its equivalent binary
Solutionn
Arithmetic Quotient of (X +2) Remainders
X 390 0
780 780+2 390, R=0 00
195
390 390+2 195, R=0 97 100
195 195+2 97, R=1l 1100
48
097 97-2=48, R=1
24 01100
48 48+2 24, R=0 12 001100|
24 24+2 12, R=0
12+2 6, R=0 6 0001100
2
6+2 3, R=0 3 00001100
3-2 1, R=l 100001100
1+2=0, R=1| 0 1100001100
Therefore, (780),, =(1100001100),
Numeration systems 25
C)Subtraction Method
Let X be the decimal numeral we want to write in binary. Repeat the following steps until
Xequals 0:
. Find the largest power of 2 that is less than or equal to X.
2. Suppose it is 2". Lety =X-2". Write 2" on theside.
3. Ify is not 0, set X=y and repeat step-1. Otherwise go to step-4.
4. Write the powers of 2 set aside in descending order
f an exponent of 2 is not found, fill its place with 0.
Replace the powers by 1's.
Example:Convert decimal number(780),, to its equivalent binary number.
Solution
Largest power of2 less than or equal to 780 2°=512
=
Now, 780-512268.
+ 1x22+0x21 +0x20
Thus, 780 1x2° + 1x28 +0x27+0x26+0x25 +0x24+ 1x23
=
co
N m
ns
Numeration systems 27
2.5.6 HEXADECIMAL to DECIMALCONVERSION
A hexadecimal number can be converted into its equivalent decimal number using the
following three easy steps.
1. Write the decimal place values of each position of the hexadecimal number
2. Multiply the hexadecimal digits with their corresponding place values.
3. Add all the product values to get the equivalent decimal umber
Thus,
(HH,H,H,H)\, =(4n*16*+.+H,x16°+H,x16+H,x16 +H,*16),
Example: Convert thehex number (AF09),, to its equivalent decimal number.
Solution: (AFO9)16 = (Ax16 + Fx16+0x16' +9x16)
= (10 x 4096 + 15 x 256 +0 x16 +9 x1),
= (40960+3840 +0+90
= (44809)10
Binary Octal
000 0
|001
010
in 011 3
|100 4
101 5
110 6
111
Example: Convert the binary number (110100111010011), to its octal number
Solution:
er. (110100111010011), 110 100 111 010 0111
3 4 2 3
(34723),
Digital systems and applicas
28 to its octalnumber
Example:Convert the binary number (1100111010011),
Solution:
100 11 010 011
(1100111010011), 100 111 010 011
001
4 2 3
(14723),
(1100111010011) into 3-bit groups
Note that while dividing the givenbinarynumber bits. Theref
the MSB is not an even group of 3
last group marked by a star (*) containing in order to make the last g
added to the left of MSB (i.e.,1)
two number ofextra zeros are are determined. Ti
an even group of3 bits.
Then octal equivalent values for each small group final
other to obtain the required equivalent
equivalent values are written adjacent to each
number ofthe given binary number.
CONVERSION
2.5.8 BINARY to HEXADECIMAL h-
hexadecimal number using the folow
can be converted into its equivalent
Abinary number
four easy steps. number starting at the LSB.
1. Make groups of 4 bits of the given binary
zeros to the left of MSB if needed.
2. Complete the last group by addinghexadecimal
3. Comvert each 4-bit group into
its equivalent.
othe n
the individual groups adjacent to each
4. Write the hex equivalent numbers of
umber.
obtain the required final hexadecimalequivalent
Hexadecimal Binary a
0000
0001
0010
3 0011
4 0100
0101
0110
0111
1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F
1111
Example:Convert the binary number (11010011), to its octal number.
Solution: (11010011), =1101 0011
=D 3
=(D3)6
Numeration systems 29
to its hexadecimalnumber.
Example: Convert the binary number (110100111010011),
Solution:
(110100111010011), *110 1001 l101 0011
0110 1001 1101 0011
6 9 D 3
(69D3),6
into 4-bit
Important: while dividing the given binarynumber (110100111010011) groups,
even group of4 bits. Therefore,
the last group marked by a star (*) containing the MSB is not an
one extra zero is added to the left of MSB (i.e.,1)
in order to make the last group an even
values for each small group are determined. These
group of 4bits. Then hexadecimal equivalent
final equivalent
equivalent values are written adjacent to each other to obtain required
the
hexadecimal number ofthe given binary number.
2.5.9 HEXADECIMAL to BINARY CONVERSION
hexadecimal number.
We have seen that a binary number can be converted to its equivalent
converted into its equivalent binary
The reverse is also true, i.e., a hexadecimal number can be
ma
number. We know 16=[Link] provides a direct correlation between 4-bit groups
each 4-bit group can be represented
binary number and the hexadecimal digit. In other words,
as one hexadecimal digit. Therefore, a
hexadecimal number can be converted into its equivalent
binary number by using the following three easy steps.
number
1. Convert each hex digit into its equivalent 4-bit binary
to each other.
2. Write these equivalent binary numbers horizontally adjacent
number
3. The complete sequence of bits will be the required equivalent binary
to its equivalent binary number.
Example:Convert the hexadecimal number(9C3),,
Solution:
C 3
(9C3)
1001 1100 0011
Therefore, (9C3),, =
(1001 1100 0011),
to its equivalent binary number.
Example : Convert the hex number (3B55F0),,
Solution
3 B 5 5 F 0
(3B55FO)
0011 1011 0101 0101 1111 0000
Therefore, (3B55FO)6 (0011 1011 0101 0101 1111 0000),
Digital systems and application Numeration systems 31
30 Example: Convert the octal number(7360), to its equivalent hex number.
BINARY CONVERSION
2.5.10 OCTAL to
into octal number, and vice versa. Th Solution:
number can be converted
We learn that a binary
converted into its equivalent binary number. T Step 1: To convert given octal number into binarynumber
reverse is also true.
An octal number can be
correlation between the 3-bit groups in a binary number and th Step 2: To convert obtained binary number into hexadecimal number.
equality8=" provides a direct an octal numbe Step 1: (7360), 0
be represented as one octal digit. Therefore,
octal digit. Each 3-bit group can
number by using the following three easy steps.
can be converted into its equivalent binary
octal number to its 3-bit binary equivalent. 111 011 110 000
1. Comvert each digit of the given
Or, (111 011 110 000),
2. Hrite these equivalent binary numbers adjacent
to each other ina line. (7360),
3. The complete sequence of bits is the required final equivalent binary
number Step 2:
(111 011 110 000), 1110 1111 0000
Example: Convert the octal number (7360), to its equivalent binary number. (14) (15) (0)
Solution: (7360), = 6 0
E F 0
111 011 110 000
Or, (111 011 110 000), (EF0)6
So, (7360), (E F 0),6
=
Therefore, (7360), =
(111 011 110 000), Example: Convertthe octal number (513), to its equivalent hex number.
Example: Convert the octal number (500431)8 to its equivalent binary numbe Solution:
Solution: (500431) 5 0 4 (513) = (101 001 011)
= (10100 1011),
=
101 000 000 100 011 001 =
(0001 0100 1011),
Therefore, (500431), = (101 000 000 100 011 001), = (14 B)6
2.5.11 OCTALto HEXADECIMALcONVERSION Therefore, (513), =
(14B),
2.5.12 HEXADECIMAL to 0CTAL CONVERSION
lOCtalnumber cannot be directly converted into its equivalent hexadecimal number. Th The
binary digits have to mediate between the conversions. We have the experience that an octi Ahexadecimal number cannot be directy converted into its equivalent octal number.
is
ofconversion
have to mediate between the conversions. The procedure analogous
D Can be converted into its equivalent binary number. The binary number so obtained ca binary digits
then be converted to its equivalent hexadecimal number. That is how an octal number can bto prevousseetn
converted into its equivalent hexadecimal number. We have the experience that a hexadecimal number can be converted into its equivalent
number. The binary number so obtained can then be converted to its equivalent octalI
e know 8- 2. So each octal digit can be represented by a group of 3 binary digitbinary
number. That is howa hexadecimal number can be converted into its equivalent octal number.
Therefore, an octal number can be easily converted into its equivalent binary number. Again, We know 16= 24. So each hexadecimal digit of the given hexadecimal number can be
know 162'. So a group of 4 binary digits will represent one hexadecimal digit. Then, threpresented by a group of 4 binary digits. Therefore, the given hexadecimal number can be easuly
binary number so obtained from the given octal number can be converted into its equivaletconverted into its equivalent binary number. We know 8=2. So a group of3 binary digits will
hexadecimal number. That is how the given octal number can be indirectly convertedinto irepresent one octal digit. Then, the binary number so obtainedfrom the givenhexadecmalnumber
can be converted into its equivalent octal number. That is how the given
hexadecimal number can
equivalent hexadecimal number.
1. Convert each digit be indirectly converted into its equivaient octal number.
of the given octal number to its 3-bit binary equivalent. I. Convert each digit of the given hex number to its 4-bit binary equivalent.
2. Write these equivalent
binary numbers adjacent to each other in a line.
3. Make groups of 4 bits 2. Write these equivalent binary numbers adjacent to each other in a line.
of the obtained binary number starting at the LSB. 3. Make groups of3 bits of the obtained binary number starting at the LSB
4. Complete the last
group by adding zeros to the left of MSB
5. Convert each 4-bit if needed. 4. Complete the last group by adding zeros to the lefi of MSB if needed.
group into its hexadecimal
6. Write the hex equivalent. 5. Convert each 3-bit group into its octal equivalent.
7.
equivalent numbers of the groups adjacent to each other
The sequence so obtained is 6. Write the octal equivalent numbers of the groups adjacent to each
other
the required The sequence so obtained is the required equivalent octal number
equivalent hexadecimal number 7.
32
Digital systems and applicat Numeration systems 33
to its equivalent octal numhar Decimal
Example:Convertthe hex number(E FO),, nber. BCD
Digit 2
Solution:
hexadecimal number into binary number 0
Step 1:To convert given
into octal number.
Step 2: To convert obtained binary number
Step I: (EF0) E 0
0
1110 1111 0000
0
Or (1110 1111 0000),
(EFO6
Step 2
(1110 1111 0000) 111 011 110 000 0
(7) (3) (6) (0)
Or, (111 011 110 000), (7 3 6
0) The type of code in which each decimal digit is represented by a fixed number
Therefore, (EFO), (7360),
2.6
uSually 4-bit or 8-bit) of binary digits is known as binary-coded decimal code or BCD
BINARY-CODED DECIMALCODE (BCD code or8-4-2-1 code) code used in computing and electronic systems.
A code is a
In BCD code, only 4-bit binary numbers from 0000 to 1001 are used. Let, (312)be the
system of symbols. It can help us communicate with digital circuits.
Weiecimal number whose equivalent binary coded decimal will be 0011 0001 0010. Four bits from
can deal
wong thdecimal numbers, whereas, circuits and machines [Link] is binary equivalent of2. The middle four bits is the binary equivalent ofl. The four bis
DIS Dgial croats work in binarymaner. Therefore, we have to convert the nunerom let is the binary equivalent of3. Each decimal digit is assigned a 4-bit binary number, even
S
aphabets ana
and special into binary format in order to communicate thermta diotal eirthough the binary equivalent may need less than 4 binary places. Therefore, the circuits using
hunctions into
special functions binary format in order to communicate them to digital
There are various codes to serve
different crcnolwavs handle the string of binary bits in 4-place groups. Usually we arop os in
purposes. In the coding, when icaulg
woras are
represented bya
numbers, letters hinary number For example. we write 110, instead of0110 in a bnary but
specific group of symbols, it is said that the number, letter or u
being encoded. The group of symbols is called as a code. lett to tne non-zer
worRCD code. it is important to keep all leading zeros placed at the extremepresentation.
We are familiar with
straight binary digits. We cannot write 110 instead of 0110 in the string of binary bits.
binary code, where the number as a whole is Comparison: Binary and BCD.
expressed in binary fashion. In this codeo Decimal Binary BCD
for
code, we write 001 for decimal
number 2, 1001 for number 1,010 0 0000 0000
decimal number 9,11101 for 29, 1101001 for 105 and so on. decm
is difficut to write
large decimal numbers Obvious 0001 0001
in binary fashion.
0010 0010
a
The difficuty of
expressing large decimal number can be avoided 0011 0011
coding, where the whole decimal number as a whole need
using another typ 100 0100
not be converted into
binary number. Rather, individual decimal
its equivak 0101 0101
upon singly. Hence, we have to digits are to be coded in
binary notation and are oper 0110 0110
we can write even
remember binary numbers only for 0111 0111
a
decimal numbers Oto
large decimal number without deep 9:1 1000 1000
is called calculation. This type
binary coded decimal coding or sys 1001 1001
so
known as BCD. In BCD we simply BCD coding. The numberofcoding 0 1010
can use the obtaine 0001 0000
-
decimal equivalent binary number from 0000 1001 11 1011 0001 0001
from
code system. Here each 0-9 respectively. It is also known as 8-4-2-1
only, which are 12 1100 0001 0010
decimal digit from 0 to 9 is 13 1101 0001 0011
code. It is a weigh
positions in each are represented 14 1110
in the codeword assigned by a 4-bit codeword.
The 0001 0100
following table. weights, from left to right,
of8,4,2, and 1, as 15 1111 0001 0101
descn
Digital systems and applicatio
34 Numeration stems 35
BCD codes for decimal numbers 0-15, Interacd
The given table shows the binaryand
and BCD have the same 4 bits, but aftenn
esting Ex. 05. Convert the binary number
(11001), to its equivalent decimal number.
from 0-9, both the equivalent binary number Solution: (11001), = ( 1x24+ 1x23 +0x22 +0x2' + 1x20).
number is of4 bits and it is 8 bits
in case of BCD. Circuits wi
decimal equivalent binary hichu
bits in tour-place groups. This code is used to tra
= ( 1x16+ 1x8 +0x4 +0x2 + 1x1 )
BCD always deal with the string ofbinary trans = (16 +8 +0+0+1)
machines like digital clocks, digital calculators,. dio
ng = (25 )10
decimal information into and out ofdigital
etc.
votmeters and frequency counters Thus, (11001),= (25)
number (734),, to its equivalent binary number
Ex. 01. Convert the decimal
Solution: Division Remainder Ex. 06. Convert the octal number (11001), to its equivalent decimal number.
7342 367 0
Solution: (11001), = ( 1x8+ 1x83 +0x82+0x8 +1x8),
367 2= 183 =
+ +
( 1x4096 + 1x512 +Ox64 Ox8 1x1)a0
1832 91 = (4096 +512 +0+0+ 1)
912 45 = (4609 ),
452 22 = (4609 )0
Thus, (11001,
222 11
112=5 Ex. 07. Convert the given hex number (11001), to decimal number.
5+2 2 Solution: (11001) = ( 1x16 + 1x163+0x16 +0x16+ 1x16°)a
22 1 0 = (1x65536 + 1x4096 +0x256 + 0x16 + 1x1 )0
1 2 0 1 =
(65536 +4096 +0 +0+1 )o
The equivalent binary number ofa decimal number is given by the remainders written int
reverse
= (69633 0
order in successive division method. Hence, (734)= (1011011110), (11001), = ( 69633 )
Thus,
Ex. 02. Convert the decimal number (734),, to its equivalent octal number. Ex. 08. Convert the octal number (673), to its equivalent decimal number.
Solution: Division Remainder = (6x82 +7x8 + 3x8 )o
6
Solution: (673),
7348 91 = (6x64 +7x8 +3x1 )0
91 8 11 = ( 384+56 + 3 )0
112 1 =
1+8=0 ( 443) 0
Remainders written in the reverse order gives the result. Hence, Thus, (673) (443 )
(734)=(1336),
decimal number.
Ex. 03. Convert the decimal Ex. 09. Convert the hex number (3F9),, to its equivalent
number (734),, to itsequivalent hexadecimal numb = +
Solution: (3F9) Fx16' +9x16°)
(3x16
Solution Division Remainder = +9x1 )
(3x256 +15x16
734+16=45 14 (E) =
45 16 2 13 (D) ( 768 +240 +9 )
2 16 0 2 1017 10
Remainders written in the reverse order gives the result. Hence,
(734)=(ED2) Thus, (3F9)6 017 )10
Ex. 04. Convert the decimal to its equivalent decimal number.
number (734),, to its equivalent number with Ex. 09. Convert the hex number (40F9),,
Solution: Division base 16 16 16 16
Remainder Solution: Positionweights:
F 9
7346 122 2 Hex number: 4 0
122 6 20 2 +Fx16 +9x16°),
206 3 Thus, (40F9) == (4x163+0x163
(4x4096 +0x256 + 15x16 +9x1 )
2
36 0 3 = ( 16384 +0+ 240 +9)(16633 10
Remainders written in the reverse order
gives the result. Hence, Thus, (40F9)-(1633 ).
(734),= (3222),
Digital systeis dia applicato
36 its equivalent
toits
the decimal number (443),, equivalent binaryn
binary numberNumeration systems
Ex. 10. Convert 37
to octal Ex. 14.
first converting Remainder
Find M if
Solution: Division Solution
(54)=(42)
4438=55 54 = 4 x M'+ 2 x M°
55 +8 6
6 54 4M+2
6 8 0 4M 54-2 52
the remainders wri
ofa decimal number in this case is given by
The equivalent number M 13.
successive division method. =
in the reverse order in Therefore, (54),, (42),
Hence (443) (673), Ex. 15. Convert the decimal number (2157),, to BCD.
converted to its equivalent binary number.
The octal number (673), is to be Solution:
Now Octal digit Binary digit 2
(3705)
6 110
111
0010 0001 0101 0111
3 011 0001 0101 0111)gcD
Therefore, (2157), (0010
So, (673),-(110 111 011), Ex. 16. Convert (50AF),, to binary.
number.
Ex. 11. Convert the octal number (3706), to its equivalent binary Solution:
Solution: (50AF) 0 A F
6
(3706)
0101 0000 1010 1111
011 111 000 110 Therefore, 50AF),, = (0101 0000 1010 1111),
Therefore, (3706), = (011 111 000 110), Ex. 17. Convert (123),, to binary.
Ex. 12. Convert the hexadecimal number (B70F),, to its equivalent binary num
Solution
Solution 3
(123)
(B70F) B F
0001 0010 0011
1011 0111 0000 1111
(0001 0010 0011),
0111 0000 1111),
Therefore, (123),
Therefore, (B70F),=
16 (1011
Ex. 18. Convert (00100100011), to hex.
Ex. 13. Convert the decimal number (3705), to BCD.
00100100011 putting an extra Oto the left.
Solution: We are to rearrange the bits
Solution 0011
00100100011= 0001 0010
(3705) 3 7
= 1 2
0011 0111 0000 0101
=
Therefore, (3705), (0011 0111 0000 0101)pcD Therefore, (000100100011), (123)
Digital systems and applicat
38 for BCD string 1000 1001 0001.
0001 Numeration systems 39
decimal number
Ex. 19. Find equivaent
Solution: We have
1000 8 , 1001
=
9, 0001 =
1.
EXERCISES
(100010010001)pcD(891),, Distinguish between analogue signal and digital signal.
Thus,
Find M if (54), = (42)
Ex. 20. 2. Write a short note on binary number system.
8+2 x 8° =
5 x 8+2 x 1 =42
5 x
How is binary system different from decimal system?
(52),
=
Solution:
42 4 M +2 x x M°
Then, How is octal system different from hexadecimal system?
42 4M +2 How can you convert a decimal number to hexadecimal system?
4M 42-2=40
M=10. 6. How can you convert a octal number to hexadecimal system?
7. Convert the decimal number (110101), to its equivalent number with base 9.
(a) 100.1 + =
110.11
(a) 100 - =
110