Introductory Concept &
Number Systems
Instructor: Afroza Sultana
This lecture includes the following sections:
What is a Digital System?
Advantages and Limitations
Electronic Implementation of Logic
Binary Number System
Other Number Systems
Relation Between The Number Systems
Conversion of Numbers
Text Codes
What is a Digital System?
Numerical Representations
• Analog : continuous
• Digital : discrete (step by step)
Digital Systems:
• Digital System is a combination of devices
designed to manipulate logical information or
physical quantities that are represented in digital
forms; they can take on only discrete values.
These devices are mostly electronic but can also
be mechanical, magnetic or pneumatic.
Basic concept
• Analog electronics represents information as a
continuously variable voltage
v(t ) A sin( wt )
t
• Digital electronics represents information as a sequence
of discrete voltage levels
– If there are 2 levels we call this binary information
– Here the information is the order and duration of
voltage levels
5
0 t
0 1 0 0 1 0 0
Advantages and Limitations
• Advantages of Digital Techniques
- Digital systems are generally easier to design.
- Information storage is easy.
- Accuracy and precision are easier to maintain
- Operation can be programmed
- More digital circuitry can be fabricated on IC chips
- Digital circuits are less affected by noise.
- Operation is faster
• Limitation of Digital Techniques
The real world is mainly ANALOG!!
To take adv. of digital tech.
- convert analog inputs to digital
- process the digital
- convert the digital outputs to analog
Example
Block diagram of a temperature control system
that requires analog/digital conversions in order to
allow the use of digital processing techniques.
Electronic Implementation of Logic
• It is common to use positive logic implementation:
TRUE/YES/HIGH/ON (1) 5 Volts
FALSE/NO/LOW/OFF (0) 0 Volts
– If we measure the voltage at a point in a circuit, we
can say whether the logical value at that point is
TRUE or FALSE.
– It is common to use logical 1 for TRUE and logic 0
for FALSE.
Voltage and Time Diagram of Digital System
(a) Typical voltage assignments in digital systems
(b) Typical digital signal timing diagram
Digital Computers
Digital Computers
Number Systems
• Binary: A binary digit has only 2 possibilities:0,1.
• Octal: An octal digit has 8 possibilities:
0,1,2,3,4,5,6,7.
• Decimal: A decimal digit has 10 possibilities:
0,1,2,3,4,5,6,7,8,9
• Hexadecimal: A hexadecimal (hex) digital has 16
possibilities:0,1,2,3,4,5,6,7,8,9,A,B,C,D,E & F.
Decimal Number System
• The decimal number system is the base 10 number
system
– Example: 259 in decimal is 2x102+5x101+9x100
Hundreds Tens Units
2 5 9
- Decimal position values as powers of 10
Binary Number System
• Uses 2 symbols by our previous rule: 0 and 1
• Example: 10011 in binary is 1x24+1x21+1x20=19
• Most common in digital 24 23 22 21 20
electronics 1 0 0 1 1
• Binary position values as powers of 2
Base 10 Base 2
The Binary Number System
0 0
• To convert data into strings of
1 1
numbers, computers use the binary
number system. 2 10
3 11
• Humans use the decimal system
(“deci” stands for “ten”). 4 100
5 101
• The binary number system works the
same way as the decimal system, but
6 110
has only two available symbols (0 and 7 111
1) rather than ten (0, 1, 2, 3, 4, 5, 6, 7,
8 1000
8, and 9).
9 1001
10 1010
Bits and Bytes
• A single unit of data is called a bit, having a value of 1
or 0.
• Computers work with collections of bits, grouping
them to represent larger pieces of data, such as letters
of the alphabet, digits of the numbers, symbols of
operations etc.
.
• Eight bits make up one byte. A byte is the amount of
memory needed to store one alphanumeric character.
• With one byte, the computer can represent one of 256
different symbols or characters.
Bits and Bytes
1
11 100 101 111 100 100 111 1010
Counting Range
• Using N bits we can count through 2N different
decimal numbers ranging from 0 to 2N – 1.
• For N = 4 we can count from 00002 to 11112 , i.e. (0 to
24 – 1) which is equivalent to (00)10 to (15) 10 .
Other Number Systems
• Decimal Number System- The common number system
that contain ten digits (0-9). The base of this system is 10.
All possible numbers can be represented with the
combinations of the ten digits.
• Octal Number System- The base of this system is 8, so
this system has only 8 digits (0-7). All possible numbers
can be represented with the combinations of the 8 digits.
• Hexadecimal Number System- The base of this system is
16, so this system has 10 digits (0-9) and the alphabets
(A-F). All possible numbers can be represented with the
combinations of the ten digits and the six alphabets.
Relation Between The Number Systems
Decimal Binary Octal Hexadecimal
0 0000 0 0
1 0001 1 1
2 0010 2 2
3 0011 3 3
4 0100 4 4
5 0101 5 5
6 0110 6 6
7 0111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
Conversion of Numbers
• Conversion between Binary and Decimal
• Conversion between Octal and Decimal
• Conversion between Hexadecimal and Decimal
Conversion between Binary and Decimal
• Binary to Decimal Conversion: Write the appropriate place
value for each bit and multiply them to make sum of the
product.
(1101011)2 =1x26 + 1x25 + 0x24 + 1x23 + 0x22 + 1x21 + 1x20
= 64 + 32 + 0 + 8 + 0 + 2 + 1
= (107)10
(101.110)2 = 1x22 + 0x21 + 1x20 + 1x2-1 + 1x2-2 + 0x2-3
= 4 + 0 + 1 + 0.5 + 0.25 + 0
=(5.75)10
Conversion between Binary and Decimal
• Decimal to Binary Conversion: Divide the number and each successive quotient by
2 and note the remainder.
Divisions Quotients Reminders
109 ÷ 2 = 54 1
54 ÷ 2 = 27 0
27 ÷ 2 = 13 1
13 ÷ 2 = 6 1 (109)10= (1101101)2
6 ÷2= 3 0
3÷2= 1 1
1÷2= 0 1
Conversion between Octal and Decimal
• Octal to Decimal Conversion: Write the appropriate place
value for each bit and multiply them to make sum of the
product.
(467)8= 4 X 82 + 6 X 81 + 7 X 80
= 256 + 48 + 7
= (311)10
(467.32)8 = 4 X 82 + 6 X 81 + 7 X 80 + 3 X 8-1 + 2 X 8-2
= 256 + 48 + 7 + 0.375 + 0.031
= (311.406)10
Conversion between Octal and Decimal
• Decimal to Octal Conversion: Divide the number and
each successive quotient by 8 and note the remainder.
Divisions Quotients Reminders
109 ÷ 8 = 13 5
13 ÷ 8 = 1 5 (109)10= (155)8
1÷8= 0 1
Conversion between Hexadecimal and Decimal
• Hexadecimal to Decimal Conversion: Write the
appropriate place value for each bit and multiply them to
make sum of the product.
(4B9)16= 4 X 162 + 11 X 161 + 9 X 160
= 1024 + 176 + 9
= (1209)10
(8E5.3C)16 = 8X162 + 14X161 + 5 X 160 + 3 X 16-1 + 12X16-2
= 2048 + 224 + 5 + 0.1875 + 0.0469
= (2277.234)10
Conversion between Hexadecimal and Decimal
• Decimal to Hexadecimal Conversion: Divide the number
and each successive quotient by 16 and note the
remainder.
Divisions Quotients Reminders
109 ÷ 16 = 6 13
(109)10= (6D)16
6 ÷ 16 = 0 6
Conversion between Octal and Binary
• Octal to Binary Conversion: Write the three bit binary for
each of the octal digit.
(7436)8 = (111 100 011 110)2
(50.64)8 = (101 000.110 100)2
• Binary to Octal Conversion: Make groups with three
successive bits (take necessary number of zeros for the
leftmost group) and convert the groups into their respective
octal number.
(1010110010)2= (001 010 110 010)2= (1262)8
(11001110.1101010)2
= ( 011 001 110. 110 101 000)2
= (316.650)8
Conversion between Hexadecimal and Binary
• Hexadecimal to Binary Conversion: Write the four bit binary
for each of the hexadecimal digit.
(7D36)16 = (0111 1101 0011 0110)2
(5A.BD)16 = (0101 1010.1011 1101)2
• Binary to Hexadecimal Conversion: Make groups with four
successive bits (take necessary number of zeros for the
leftmost group) and convert the groups into their respective
hexadecimal number.
(1010110010)2= (0010 1011 0010)2= (2B2)16
(11001110.1101010)2
= (1100 1110. 1101 0100)2
= (CE.B4)16
Conversion between Octal and Hexadecimal
• Octal to Hexadecimal Conversion: Write the three bit binary
for each of the octal digit and then make groups with four
successive bits and convert the groups into their respective
hexadecimal number.
(7436)8 = (111 100 011 110)2 = (1111 0001 1110)2 = (F 1 E)16
(50.64)8 = (101 000.110 100)2 = (0010 1000.1101 0000)2 = (28.C0)16
• Hexadecimal to Octal Conversion: Write the four bit binary
for each of the hexadecimal digit and then make groups with
three successive bits and convert the groups into their
respective octal number.
(A4E7)16=(1010 0100 1110 0111)2
= (001 010 010 011 100 111)2
= (122347)8
Text Codes
• A text code is a system that uses binary numbers (1s
and 0s) to represent characters understood by
humans (letters and numerals and symbols). There
are two types of codes:
• Alphanumeric Code - represents all the
characters, symbols, operators and digits of the
number.
• Numeric Code – represents only the digits of
the number.
Numeric Code
Decimal BCD
• BCD Code- The 4 bit
numeric code called the 0 0000
Binary Coded Decimal
1 0001
is designed for the
decimal digits 0 through 2 0010
9. This is called
straightway binary 9 1001
coding. Example:
10 0001 0000
11 0001 0001
100 0001 0000 0000
Alphanumeric Code
• ASCII- The most common text-code set is ASCII
(American Standard Code for Information
Interchange) , was developed as a seven bits code.
ASCII is used in nearly all personal computers. Here
each code is divided into four zone bits and four
numeric bits, thus a total of eight bits .
• The distribution of code in ASCII is as follows:
Uppercase Letters (A – Z) = 26
Lowercase Letters (a – z) = 26
Digits of Numbers (0 – 9) = 10
Operators & Punctuations = 15
Symbols and others = 51
Total 128
Code Character
Examples of the 0011 0000 0
ASCII Text Code
0011 0001 1
0011 0010 2
0011 0011 3
0011 0100 4
0000 0001 0011 0101 5
Zone Bits Numeric Bits
0100 0001 A
0100 0010 B
0100 0011 C
0100 0100 D
0100 0101 E
Partial listing of ASCII code
Other Text Codes
• EBCDIC- Extended Binary Coded Decimal Interchange
Code is an early text code system, called EBCDIC, uses
eight-bit codes. This code is used primarily in older
mainframe systems.
• Unicode- The Unicode Worldwide Character Standard
provides two bytes to represent each letter, number or
symbol. With two bytes enough codes can be made to
represent 65536 different characters and symbols in the
world. It is designed to support international languages
like: Bengali, Hindi, Chinese, Japanese, Korean, Arabic
etc.