0% found this document useful (0 votes)
5 views

Lecture-2

The document explains various number systems used in computing, including binary, decimal, octal, and hexadecimal systems, highlighting their differences and conversions. It discusses the importance of binary numbers in electronic devices and the use of complements for simplifying subtraction operations in digital computers. Additionally, it provides methods for converting between different number systems and details on how to perform subtraction using complements.

Uploaded by

mahmudhasansami
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Lecture-2

The document explains various number systems used in computing, including binary, decimal, octal, and hexadecimal systems, highlighting their differences and conversions. It discusses the importance of binary numbers in electronic devices and the use of complements for simplifying subtraction operations in digital computers. Additionally, it provides methods for converting between different number systems and details on how to perform subtraction using complements.

Uploaded by

mahmudhasansami
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

07/01/2024

NUMBER SYSTEM
Number system is a basis for counting varies items. Modern computers communicate and
operate with binary numbers which use only the digits 0 &1. Basic number system used by
humans is Decimal number system.
For Ex: Let us consider decimal number 18. This number is represented in binary as 10010.
We observe that binary number system take more digits to represent the decimal number.
For large numbers we have to deal with very large binary strings. So this fact gave rise to three
new number systems.
 Octal number systems
 Hexa Decimal number system
 Binary Coded Decimal number(BCD) system
07/01/2024

Binary odometer Decimal odometer


(Binary)2 (Decimal)10 (Hexadecimal)16 (Octal)8
(Decimal)10
0 0 0 0 0 0 0
0 0 0 1 1 1 1 0
0 0 1 0 2 2 2
1
0 0 1 1 3 3 3
2
0 1 0 0 4 4 4
0 1 0 1 5 5 5 3
0 1 1 0 6 6 6 4
0 1 1 1 7 7 7
5
1 0 0 0 8 8 10
6
1 0 0 1 9 9 11
1 0 1 0 10 A 12 7
1 0 1 1 11 B 13 8
1 1 0 0 12 C 14
9
1 1 0 1 13 D 15
Carry Reset
1 1 1 0 14 E 16
1 1 1 1 15 F 17 1 0

Why binary numbers are used?


The binary number system is another way to represent quantities. It is less complicated
than the decimal system because the binary system has only two digits. Electronic devices
are most reliable when designed for two state (binary) operation.
Transistor
Computer use Integrated circuit (IC′s) with
thousands of transistors. These transistors are
operated in two state design is the cutoff and
saturation approach.

Transistor register
A register is a string of devices that can store
data like 1100. The transistor on the left is cut
off because the input base voltage is 0V and
the transistor on the right are in saturation.
Four-bit register is shown in figure.
07/01/2024

Bit
It is an abbreviation of the binary digits. A binary number like 1100 has four bits., 110011
has six bits etc. To store large binary number, it needs more transistors. Adding two more
transistor we get six-bit register

Decimal conversion:
⋯ ⋯
m= integer digit
R= base value
a= co-efficient

Octal to decimal conversion:


(5672)8
(N)10 = 5×83+6×82+7×81+2×80
= (3002)10
= 3×103+0×102+0×101+2×100 Binary to decimal conversion:

= (3002)10 (1001101)2
(N)10 = 1×26+ 0×25+0×24+1×23+1×22+0×21+1×20
Hexadecimal to decimal conversion:
= (77)10
(AF16B)16
(N)10 = A×164+F×163+1×162+6×161+B×160
= 10×164+15×163+1×162+6×161+11×160
= (717163)10
07/01/2024
07/01/2024
07/01/2024

Complement′s:
Complements are used in digital computers to simplify the subtraction operation and for
logical manipulation. Simplifying operations leads to simpler, less expensive circuits to
implement the operations. There are two types of complements for each base-r system:
the radix complement and the diminished radix complement. The first is referred to as
the r′s complement and the second as the (r - 1)′s complement. When the value of the
base r is substituted in the name, the two types are referred to as the 2′s complement and
1′s complement for binary numbers and the 10′s complement and 9′s complement for
decimal numbers.
R′s complement
Rn-N

Where,
n= Number of integer digit
N= The number itself
R= base
For example (526.27)
n=3
N= 526.27

R′s complement
Rn-N
07/01/2024

Subtraction with Complements:


The direct method of subtraction taught in elementary schools uses the borrow concept.
In this method, we borrow a 1 from a higher significant position when the minuend digit
is smaller than the subtrahend digit. The method works well when people perform subtraction with
paper and pencil. However, when subtraction is implemented with digital hardware, the method is less
efficient than the method that uses complements. The subtraction of two n-digit unsigned numbers
(M–N) in base r can be done as follows:

1. Add the minuend M to the r′s complement of the subtrahend N. Mathematically,


M + (rn - N) = M - N + rn.
2. If M ≥ N, the sum will produce an end carry rn, which can be discarded; what is
left is the result M - N.
3. If M ≤ N, the sum does not produce an end carry and is equal to rn - (N - M),
which is the r′s complement of (N - M). To obtain the answer in a familiar form,
take the r′s complement of the sum and place a negative sign in front.
07/01/2024

b)
b)

You might also like