COA Module 3
COA Module 3
Table 2.1
Binary Number System
Number System with base value 2 is termed as Binary number system. It
uses 2 digits i.e. 0 and 1 for the creation of numbers. The numbers
formed using these two digits are termed Binary Numbers. The binary
number system is very useful in electronic devices and computer systems
because it can be easily performed using just two states ON and OFF i.e.
0 and 1.
The leftmost bit is called as the most significant bit (MSB) and the right
most bit is called as least significant bit (LSB). Any number of 0s can be
added to the left of the number without changing the value of the number.
In binary system , a group of 4 bits is called as the Nibble and a group of
eight bits is called a byte.
Example of 19 in the binary system Remember
Exp 1
Here 19 Or (19)10 can be written as (10011)2
Exp 2
Exp
3
● Bit is the smallest unit of data
● 1 Nibble = 4 bits (Nibble is used in BCD and
Hexadecimal number)
● 1 Byte= 8bits
● 1 Word= 16 bit
● 1 Double word= 32 bit
Decimal Number System
Number system with a base value of 10 is termed a Decimal number system.
It uses 10 digits i.e. 0-9 for the creation of numbers.
Here, each digit in the number is at a specific place with a place value of a
product of different powers of 10.
Here, the place value is termed from
right to left as first place value called units,
second to the left as Tens, so on Hundreds,
Thousands, etc.
Test Yourself:
Test Yourself :
Signed Binary Numbers
In the decimal number system a plus (+) sign is used to denote a positive number and
a minus (-) sign for denoting a negative number.
The plus sign is usually dropped, and the absence of any sign means that the number
has positive value.
As is well known, digital circuits can understand only two symbols, 0 and 1; therefore,
we must use the same symbols to indicate the sign of the number also.
Normally, an additional bit is used as the sign bit and it is placed as the most
significant bit.
On the other hand, in the signed binary form, 11000100 represents a negative number with
magnitude (1000100)2 = (68)10
The 1 in the left most position (MSB) indicates that the number is negative and the other
seven bits give its magnitude.
The user must take care to see the representation used while dealing with the binary
numbers.
One’s Complement Representation
In a binary number, if each 1 is replaced by 0 and each 0 by 1, the resulting
number is known as the one's complement of the first number.
If one of these numbers is positive, then the other number will be negative with the
same magnitude and vice-versa.
For example, (0101), represents (+5) 10, whereas (1010), represents (-5) 10 in this
representation.
In this representation also, MSB is 0 for positive numbers and 1 for negative
numbers.
Two’s Complement Representation
If 1 is added to 1's complement of a binary number, the resulting number is known as
the two's complement of the binary number.
Similar to decimal and binary number systems, it is also a positional system and has, in general, two parts:
integer and fractional, set apart by a radix (octal) point (.).
The weights assigned to the various positions are given in Table 2.1. For example, (6327.4051), is an octal
number.
Decimal to Octal Number System
The conversion from decimal to octal (base-10 to base-8) is similar to the conversion procedure for base-10 to
base-2 conversion.
The only difference is that number 8 is used in place of 2 for division in the case of integers and for
multiplication in the case of fractional numbers.
Decimal to Octal Number System
Octal Number System
The number system with base (or radix) 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
numbers.
Similar to decimal and binary number systems, it is also a positional system and
has, in general, two parts: integer and fractional, set apart by a radix (octal)
point (.).
Here in 0.623
when
converting to
binary we
dont really
know when
will entire
sequence of
0’s will come
This information will be
saved in a fixed bit
memory representation
like the below fig.
1. Single precision:
biased exponent 127+6=133
133 = 10000101
Normalised mantissa = 010101001
we will add 0's to complete the 23 bits
2. Double precision:
biased exponent 1023+6=1029
1029 = 10000000101
Normalised mantissa = 010101001
we will add 0's to complete the 52 bits
Disadvantages:
Complex to understand: The algorithm is more complex to understand and implement than traditional
multiplication methods.
Limited applicability: The algorithm is only applicable for multiplication of signed binary numbers, and cannot be
used for multiplication of unsigned numbers or numbers in other formats without additional modifications.
Step-by-Step Explanation of Booth's Algorithm
1. Initialization:
- Acc (Accumulator)** is initialized to `0`.
- Q (Multiplier)** is set to the binary value of the multiplier.
- M (Multiplicand)** is set to the binary value of the multiplicand.
- Q-1 (Previous Bit)** is initialized to `0`.
- Count is initialized to the number of bits in the multiplier (`n`).
Initialisation
0 0
n=5=
101
1 0
1 1 100
011
1 1 010
011
0 1
000
Division of Integers: Restoring and Non-Restoring Division
Signed Division.
Basics of Digital Circuits: NOT, AND, OR,
NAND, NOR, EX-OR, EX-NOR Gates