0% found this document useful (0 votes)
66 views52 pages

4a (Digital System) Number System

The document discusses number systems used in digital circuits including binary, decimal, octal, and hexadecimal. It explains how to convert between these different number systems and provides examples of converting between binary, decimal, octal, and hexadecimal numbers.

Uploaded by

Syahmi Akmal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views52 pages

4a (Digital System) Number System

The document discusses number systems used in digital circuits including binary, decimal, octal, and hexadecimal. It explains how to convert between these different number systems and provides examples of converting between binary, decimal, octal, and hexadecimal numbers.

Uploaded by

Syahmi Akmal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 52

CHAPTER 4

DIGITAL SYSTEM
CHAPTER 4A: INTRO & NUMBERING SYSTEM
AND CONVERSION
Learning Outcome
Able to convert between different number systems
Able to understand and use logic gates and Boolean
algebra
Able to minimize Boolean functions using KMap
Able to design and construct combinational logic
circuits
Able to use Medium-scale integration (MSI) devices
Able to design and construct sequential logic circuits
Analog Circuits vs Digital Circuits
Analog Circuits Digital Circuits

Analog circuits are used in amplifiers, Voltages involved are only two values
transformers, regulators and filters. Analog (high or low). These voltages are discrete
circuits have continuous voltage and current and usually represented as binary value.
values.

Op-amp (analog) NOT gate(digital)


Analog quantities have Digital quantities have discrete
continuous values sets of values
Advantages of digital circuit
 1) signals represented digitally can be
transmitted without degradation due to
noise.
 2) Can be used to store large quantity of
data easily.eg: thumb-drive, hard-disk.
 3) Are much simpler than analog circuits
in terms of design and operation. Only
process two values- high and low
 4) To process digital signals, it is
important to know how numbers and
values are represented in digital circuits.
This covered in chapter ‘Numbering
Conversions’
NUMBERING SYSTEM
Consists of binary number, decimal, octal and
hexadecimal.
For binary number (base 2) it only consist of 1 and 0.
Decimal consist of (base 10) 0-9
Octal (0-7) base 8
Hexadecimal (base 16) consist of number 0-F
Decimal Number System
Decimal number system is a base 10 number system having 10 digits from 0 to 9.
This means that any numerical quantity can be represented using these 10 digits.
Decimal number system is also a positional value system.
This means that the value of digits will depend on its position. Let us take an example to
understand this.

Say we have three numbers – 734, 971 and 207. The value of 7 in all three numbers is
different−
• In 734, value of 7 is 7 hundreds or 700 or 7 × 100 or 7 × 10 2
• In 971, value of 7 is 7 tens or 70 or 7 × 10 or 7 × 10 1
• In 207, value 0f 7 is 7 units or 7 or 7 × 1 or 7 × 10 0
The weightage of each position can be represented as follows −

In digital systems, instructions are given through electric signals; variation is done by varying
the voltage of the signal.
Having 10 different voltages to implement decimal number system in digital equipment is
difficult.

So, many number systems that are easier to implement digitally have been developed.
27FA16
BINARY CONVERSION
BINARY-DECIMAL
Any binary number can be converted into its equivalent
decimal number using the weights assigned to each bit
position. Since only two digits are used, the weights are
powers of 2. these weights are20 (Units), 21 (two’s), 22 (fours),
23 (eights) and 24 (sixteen). If longer binary number involved,
the weights continue in ascending powers of 2.

The decimal equivalent of a binary number equals the sum of


all binary number equal the sum of all binary digits
multiplied by their weights.
Example 1
Find the decimal equivalent of binary number 11111 2

Solution:
The equivalent decimal number is,
= 1 x 24 + 1 x 23 + 1 x 22 + 1 x 21 + 1 x 20
= 16 + 8 + 4 + 2 + 1
= ( 31 )10
Example 2
 Determine the decimal numbers represented by the
following binary numbers.
a) 101101. 10101
b) 1001 . 0101
DECIMAL-BINARY

 Any decimal number can be converted into its equivalent


binary number. For integers, the conversion is obtained
by continuous division by 2 and keeping track of the
remainders, while for fractional parts, the conversion is
effected by continuous multiplications by 2 and keeping
track of the integers generated.
Example 1
How to convert decimal 13 to its binary equivalent.

Solution: Division
by 2 Quotient Remainder

13/2 6 1
6/2 3 0
3/2 1 1
1/2 0 1
Example 2
 Convert decimal 23 to binary.

Solution:
Example 3
 Convert ( 0.65625)10 to an equivalent base –2 number.

Solution:
Example 4
Given an fraction decimal number n and integer k,
convert decimal number n into equivalent binary number
up-to k precision after decimal point.
Examples:

Input: n = 2.47, k = 5 Output:


10.01111

Input: n = 6.986 k = 8 Output:


110.11111100
Let's take an example for n = 4.47 k = 3

Step 1: Conversion of 4 to binary

1. 4/2 : Remainder = 0 : Quotient = 2


2. 2/2 : Remainder = 0 : Quotient = 1
3. 1/2 : Remainder = 1 : Quotient = 0

So equivalent binary of integral part of decimal is 100.

Step 2: Conversion of .47 to binary

4. 0.47 * 2 = 0.94, Integral part: 0


5. 0.94 * 2 = 1.88, Integral part: 1
6. 0.88 * 2 = 1.76, Integral part: 1

So equivalent binary of fractional part of decimal is .011

Step 3: Combined the result of step 1 and 2.


Final answer can be written as:
100 + .011 = 100.011
Exercise:
 Express the following decimal numbers in the binary
form.
a)25.5 b) 10.625
BINARY TO OCTAL

Binary numbers can be


converted into equivalent octal
numbers by making groups of
three bits starting from LSB and
moving towards MSB for integer
part of the number and then
replacing each group of three
bits by its octal representation.
For fractional part the groupings
of three bits are made starting
from the binary point.
Example 1
 Convert 0011001102 to its octal equivalent.
Example 2
OCTAL TO BINARY
Octal numbers can be converted into equivalent binary
numbers by replacing each octal digit by its 3 – bit binary
equivalent.
Example 1
 Convert 7368 into an equivalent binary number.

Solution:
7 3 6

111 011 110

Therefore 7368 = 1110111102


HEXADECIMAL TO BINARY

Hexadecimal numbers can


be converted into
equivalent binary
numbers by replacing
each hex digit by its
equivalent 4 – bit binary
numbers. (0-F)
Example 1
 Convert 2 F 9 A 16 to equivalent binary number.
BINARY TO HEXADECIMAL

Binary numbers can be converted into the equivalent


hexadecimal numbers by making groups of four bits
starting from LSB and moving towards MSB for integers
part and then replacing each group of four bits by its
hexadecimal representation.

For the fractional part, the above procedure is repeated


starting from the bit next to the binary point and moving
towards the right.
Example 1
 Convert the following binary numbers to their equivalent
hex numbers.
a) 10100110101111
b) 0.00011110101101
Example 2 − Convert binary number 1101010 into
hexadecimal number.

First convert this into decimal number:


= (1101010)2
= 1x26+1x25+0x24+1x23+0x22+1x21+0x20
= 64+32+0+8+0+2+0
= (106)10
Then, convert it into hexadecimal number
= (106)10 Other method: if calculate using calculator
(consider the remainder only)
106 / 16 = 6.625
0.625 x 16 = A
= 106/16 = 6, remainder is 10
6 / 16 = 0.375
6/16 = 0, remainder is 6 0.375 x 16 = 6
**During exam, you need to show the working solution
Example 3
Convert binary number 001100101.110111 into hexadecimal number.
Since there is binary point here and fractional part. So,

Therefore, Binary to hexadecimal is,


= (001100101.110111)2
= (0 0110 0101 . 1101 1100)2
= (0110 0101 . 1101 1100)2
= (6 5 . D C)16
= (65.DC)16
OCTAL CONVERSION
The number system with base eight is known as the octal
number system. In this system eight symbols, 0, 1, 2,
3,4,5,6, and 7 are used to represent the number. Similar
to decimal and binary number systems, it is also a
positional system and has, in general, two parts :

Integer and fractional , set a part by a radix point. For


example ( 6327. 4051)8 is an octal number
OCTAL TO DECIMAL

Any octal number can be converted into its equivalent


decimal number using the weights assigned to each bit
position. Since only eight digits are used, the weights are
powers of 8. these weights are 80 (Units), 81 (eight’s), 82
(64), 83 (512) and 84 (4096). If longer octal number
involved, the weights continue in ascending powers of 8.

The decimal equivalent of a octal number equals the


sum of all octal number equal the sum of all octal
digits multiplied by their weights.
Example 1

7
DECIMAL TO OCTAL
For conversion from decimal to octal the procedure
used in binary system is applicable, using 8 as the
dividing (for integer part) and multiplying (for
fractional part) factor.
Exercise
a)

8
HEXADECIMAL CONVERSION
 Hexadecimal number system is very popular in computer
uses. The base for hexadecimal number system is 16
which requires 16 distinct symbols to represent the
number. These are numerals 0 through 9 and alphabets A
through F. this is an alphanumeric number system
because its uses both alphabets and numericals to
represent a hexadecimal number.
HEXADECIMAL TO DECIMAL

Obtain decimal equivalent of hexadecimal number


3A.2F16 solution.
DECIMAL TO HEXADECIMAL
For conversion from decimal to hexadecimal the
procedure used in binary as well as octal system is
applicable, using 16 as the dividing (for integer part) and
multiplying (for fractional part) factor.
Example 1
Convert the following decimal number into hexadecimal
number.
Example 2
Adding and Subtracting Binary Numbers
Example
https://www.cimt.org.uk/projects/mepres/book9/bk9
i1/bk9_1i2.html

You might also like