0% found this document useful (0 votes)
16 views8 pages

Number Systems in Digital Electronics

The document provides an overview of number systems used in digital electronics, including decimal, binary, octal, and hexadecimal systems, detailing their bases, coefficients, and examples. It also covers base conversions, including methods for converting between different bases and special cases like Binary Coded Decimal (BCD) and binary arithmetic operations. Additionally, it discusses fixed-point and floating-point representations for storing numbers in digital systems.

Uploaded by

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

Number Systems in Digital Electronics

The document provides an overview of number systems used in digital electronics, including decimal, binary, octal, and hexadecimal systems, detailing their bases, coefficients, and examples. It also covers base conversions, including methods for converting between different bases and special cases like Binary Coded Decimal (BCD) and binary arithmetic operations. Additionally, it discusses fixed-point and floating-point representations for storing numbers in digital systems.

Uploaded by

Tharun konda
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Digital Electronics

5 NUMBER SYSTEM

5.1. NUMBER SYSTEM

5.1.1. Base (Radix)


Total number of digit used in the system

{Digit 0 – 9) {Digit – 0,1} {Digit 0 – 7} {digit 0 – 9, A – F}


Fig. 5.1.

5.1.2. Decimal Number System


… 104 103 102 101 100 10–1 10–2 10–3…
… a4 a3 a2 a1 a0 a–1 a–2 a–3 …
ai → Coefficient of decimal number system
10i → Weight of decimal number system
Example: - (501.23)10
102 101 100 10–1 10–2
5 0 1 2 3
Base Digit
2 0, 1
3 0, 1, 2
4 0, 1, 2, 3
5 0, 1, 2, 3, 4
6 0, 1, 2, 3,4,5

GATE WALLAH ELECTRONICS & COMMUNICATION HANDBOOK 5.1


Digital Electronics

7 0, 1, 2, 3, 4, 5, 6
8 0, 1, 2, 3, 4, 5, 6, 7
9 0, 1, 2, 3, 4, 5, 6, 7, 8
10 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
11 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A
12 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B
13 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C
14 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D
15 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E
16 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
5.1.3 Binary Number System (Base (Radix) = 2)

… 24 23 22 21 20 2–1 2–2 2–3 …


… a4 a3 a2 a1 a0 a–1 a–2 a–3 …
2 → Weight of Binary number system
i

ai → Coefficient of Binary number system {0, 1}

Example:- (101.11)2
22 21 20 2–1 2–2
1 0 1 1 1

5.1.4. Octal Number System (Base (Radix) = 8)

… 83 82 81 80 8–1 8–2 8–3…


… a3 a2 a1 a0 a–1 a–2 a–3…
8 → Weight of Octal number system
i

ai → Coefficient of Octal number system {0 -7}

Example:- (728.64)8
2
8 81 80 8–1 8–2
7 2 8 6 4

5.1.5 Hexadecimal Number System (Base (Radix) = 16):


… 163 162 161 160 16–1 16–2 16–3…
… a3 a2 a1 a0 a–1 a–2 a–3…
16i → Weight of Hexadecimal number system
ai → Coefficient of Hexadecimal number system {0 – 9, A–F}

Example: (A2C.F)16
162 161 160 16–1
A 2 C F
5.1.6. In base conversion 2 key points are there:
(A) Any base to Decimal conversion
(B) Decimal to any other base conversion

GATE WALLAH ELECTRONICS & COMMUNICATION HANDBOOK 5.2


Digital Electronics

(A) Any base to Decimal conversion:

a3 a2 a1 a0 . a1 a2    10


a 3 r3  a2  r2  a1  r1  a0  r0  a1 a2  r2 
10
1
r 
Case (1) : Binary to Decimal conversion
Ex. (1011.11)2 = ( )10
 (1 23) (0 22)  (1 21)  (1 20)  (1 21)  (1 22)
 
 8  0  2 1 0.5  0.2510
 (11.75)10

Case (2) : Octal to Decimal conversion


Ex. (721.4)8 = ( )10
 (782 )  (281)  (180)  (481)
  10

 448 16 1 0.510


 (465.5)10

Case (3) : Hexadecimal to Decimal


conversion Ex. (A2B.C)16
=( )16
 (A162 )  (2161)  (B160 )  (C 161)
  10
 (10 256) (216)  (111)  (12161)
 10

 2560  32 11 0.7510


 (2603.75)10

Case (4) : Base 5 to Decimal conversion


Ex. (432.22)5 = ( )10
 (452 )  (351)  (250 )  (251)  (252)
 10

 100 15  2  0.4  0.0810


 (117.48)10

(B) Decimal to any other Base conversion

GATE WALLAH ELECTRONICS & COMMUNICATION HANDBOOK 5.3


Digital Electronics

0  a1 a2 a3  r  x0  x1 x2


0  x1 x2  r  x1  x3 x4
0  x3 x4  r  x2  x5 x6

a3 a2 a1 a0  a1 a2 a3 10 b3 b2 b1 b0  x0 x1 x2 r


Case (1) : Decimal to Binary Base conversion.
Ex.

Case (2) : Decimal to Octal Base conversion.


Ex.

Case (3): Decimal to Hexadecimal Base conversion.


Ex.

GATE WALLAH ELECTRONICS & COMMUNICATION HANDBOOK 5.4


Digital Electronics

5.2. Some Special Case


Case (1): Binary to Octal base conversion
Example: (10110111)2 = ( )8
Octal → means base 8
8 = 23
Every three digits of binary represent one digit of octal
010 110 111
2 6 7
Hence (10110111)2 = (267)8
Case (2): Binary to Hexadecimal base conversion
Example: (1011011)2 = ( )16
Hexadecimal → means base 16
16 = 24
Every four digits of binary represent one digit of Hexadecimal.
0101 1011
5 11(B)
Hence (1011011)2 = (5B)16

5.1.2. BCD (Binary Coded Decimal)


 In this each digit of the decimal number is represented by its four-bit binary equivalent. It is also called natural BCD
or 8421 code. It is weighted code.
 Excess – 3 Code: This is an non weighted binary code used for decimal digits. Its code assignment is obtained from
the corresponding value of BCD after the addition of 3.
 BCO (Binary Coded Octal): In this each digit of the Octal number is represented by its three-bit binary equivalent.
 BCH (Binary Coded Hexadecimal): In this each digit of the hexadecimal number is represented by its four bit
binary equivalent.
Decimal BCD 8421 Excess – 3 Octal digits BCO Hexadecimal BCH
Digits Digits
0 0000 0011 0 000 0 0000
1 0001 0100 1 001 1 0001
2 0010 0101 2 010 2 0010
3 0011 0110 3 011 3 0011
4 0100 0111 4 100 4 0100
5 0101 1000 5 101 5 0101
6 0110 1001 6 110 6 0110
7 0111 1010 7 111 7 0111
8 1000 1011 8 1000

GATE WALLAH ELECTRONICS & COMMUNICATION HANDBOOK 5.5


Digital Electronics

9 1001 1100 9 1001


A 1010
B 1011
C 1100
D 1101
E 1110
F 1111

Don’t care values or unused states in BCD code are 1010, 1011, 1100, 1101, 1110, 1111.
Don’t care values or unused states in excess – 3 code are 0000, 0001, 0010, 1101, 1110, 1111.
The binary equivalent of a given decimal number is not equivalent to its BCD value.
Example: 2510 = 110012.
The BCD equivalent of decimal number 25 = 00100101 from the above example the BCD value of a given decimal number is
not equivalent to its straight binary value.
The BCO (Binary Coded Octal) value of a given Octal number is exactly equal to its straight binary value.
Example: 258 = 2110 = 0101012
The BCO Value of 258 is 010101.
From the above example, the BCO value of a given Octal number is same as binary equivalent of the same number.
The BCH (Binary Coded Hexadecimal) value of a given hexadecimal number is exactly equal to its straight binary.
Example: 2516 = 3710 = 1001012
The BCH value of hexadecimal number 2516 = 00100101.
From this example the above statement is true.

Binary Octal Decimal Hexadecimal


Complement r =2 r=8 r = 10 r = 16
(r – 1)’s 1’s 7’s 9’s 15’s
r’s Complement 2’s 8’s 10’s 16’s

Example: Add the two Binary numbers 1011012.


Augned 101101
addend 100111
1111
Sum 1010100

Example: Subtract the Binary number 1001112 from 1011012.


Minuend : 101101
Subtracted: 100111
Difference: 000110

GATE WALLAH ELECTRONICS & COMMUNICATION HANDBOOK 5.6


Digital Electronics

Example: Multiple the Binary number 10112 from 1012.


Multiplicand: 1011
Multiplier: X101
1011
0000
1011
+
Product: 110111

While storing the signed binary numbers in the internal registers of a digital computer} most significant bit position is always
reserved for sign bit and the remaining bits are used for magnitude.

Fig. 5.2.
When the binary number is positive, the sign is represented by '0’. When the number is negative, the sign is represented by ' 1’.
5.2.2. Fixed-Point Representation and Floating-Point Representation;
The representation of the decimal point (ordinary point) in a register is complicated by the fact that it is characterized by a
position between two flip- flops in the register.
There are two ways of specifying the position of the decimal point in a register.
(1) Fixed Point and
(2) Floating Point.
The fixed point method assumes that the decimal point (or binary point) is always fixed in one position. The two
positions most widely used are (1) a decimal point in the extreme left of the register to make the stored number a fraction, and
(2) a decimal point in the extreme right of the register to make the stored number an integer.

The floating-point representation uses a second register to store a number that designates the position of the decimal point in
the first register.
Positive numbers are stored in the registers of digital computer in sign magnitude form only.
Negative number can be represented in one of three possible ways.
1. Signed – magnitude representation.
2. Signed – 1’s complement representation.
3. Signed – 2’s complement representation.
Example: +9 9
Signed – magnitude 0 0001001 (a) 1 000 1001 signed – magnitude
(b) 1 111 0110 signed – 1’s complement
(c) 1 111 0111 signed – 2’s complement

GATE WALLAH ELECTRONICS & COMMUNICATION HANDBOOK 5.7


Digital Electronics

The 2’s complement of a given binary number can be formed by leaving all least significant zeros and the first non-zero digit
unchanged, and then replacing 1’s by 0’s and 0’s by 1’s in all other higher significant digits.
Example: The 2’s complement of 100110002 is 01101000.
Subtraction using 2’s complement: Represent the negative number in signed 2’s complement from, add the two numbers, including
their sign bit, and discard any carry out of the most significant bit.
Since negative numbers are represented in 2’s compliment form, negative results also obtained in signed 2’s compliment form.
Example: 1’s complement:

+ 6 0000110 6 1111001 + 6 0000110 – 6 1111001


+ 9 0001001 9 0001001 – 9 1110110 – 9 1110110

+ 15 0001111 +3 (i) 0000010 – 3 1111100 – 15 (1) 1101111


Carry + 1 Carry + 1
+ 3 0000011 1110000
carry carry
The advantage of signed 2’s complement representation over the signed 1’s compliment from (and the signed – magnitude form)
is that it contains only one type of zero.

The general form of floating – point number is mre. Where M = Mantissa, r = base, e = exponent.
Example: + 0.3574 × 105.
The mantissa can be a fixed point fraction or fixed point integer.
Normalization: Getting non-zero digit in the most significant digit position of the mantissa is called Normalization.
 If the floating point number is normalized, more number of significant digits can be stored, as a result accuracy can
be improved.
 A zero cannot be normalized because it does not contain a non-zero digit. The hexadecimal code is widely used in
digital systems because it is very convenient to enter binary data in a digital system using hexcode.
 The parity of a digital word is used for detecting error in digital transmission. Hollerith code is used for punched
card data.
 In weighted codes, each position of the number has specific weight. The decimal value of a weighted code number is
the algebraic sum of the weights of those positions in which 1's appears.
 Most frequently used weighted codes are 8421, 2421 code, 5211 code and 8421 code.
 Reflective Code: A code is called reflective or self-complimenting, if the code for 9 is the compliment for the code
for 0, code for 8 is the compliment from 1 and so on. 2421, 842′1′, 5211 are examples for reflected codes.
 Sequential Code: A code is called sequential, if each successive code-is one binary number greater than its
preceding code.
Example: 8421



GATE WALLAH ELECTRONICS & COMMUNICATION HANDBOOK 5.8

Common questions

Powered by AI

In a hexadecimal to decimal conversion, each digit of the hexadecimal number is multiplied by 16 raised to the power of its position from right to left, starting with 0. As an example, to convert (A2B.C)₁₆ to a decimal, calculate as follows: A=10, 2=2, B=11, C=12. So, (10 * 16²) + (2 * 16¹) + (11 * 16⁰) + (12 * 16⁻¹) = 2560 + 32 + 11 + 0.75 = 2603.75 .

In octal to decimal conversion, each digit of the octal number is multiplied by 8 raised to the power of its position index (starting from zero). For instance, to convert (721.4)₈ to decimal: (7 * 8²) + (2 * 8¹) + (1 * 8⁰) + (4 * 8⁻¹) results in 448 + 16 + 1 + 0.5, which equals 465.5 in the decimal system. This process mirrors the decimal conversion but uses base 8 instead of base 10 .

Parity is used in digital communication for error detection. It involves adding an extra parity bit to a string of binary code to make the total number of 1s either even or odd. The parity bit, checked upon receipt, helps detect single-bit errors in data transmission. Even parity requires the number of 1s in the data plus the parity bit to be even, while odd parity requires this total to be odd, thereby flagging errors if parity checks do not match .

Hexadecimal representation simplifies human interaction with binary-coded information by grouping binary digits into sets of four, mapping directly to a single hexadecimal digit (0-9, A-F). This compactness reduces error chances in reading and transcription, speeds up data entry, and simplifies binary calculations or logic-decisions in digital systems, such as debugging. Thus, people can manage complex data more effectively, enhancing productivity and reducing errors in system design and maintenance .

Floating-point representation allows a wide range of values by using a set of significant digits (mantissa) and an exponent, which specifies the number's scale. Unlike fixed-point numbers, which have a constant scale factor or fixed number of digits after the decimal, floating-point values can represent both very large and very small numbers efficiently. This flexibility makes floating-point representations advantageous for scientific calculations requiring a high degree of precision and large dynamic ranges. For example, using normalization, significant digits are maximized, improving precision .

Negative numbers in digital systems can be represented using three main methods: signed-magnitude, 1's complement, and 2's complement. The 2's complement representation is most advantageous as it eliminates the existence of negative zero, simplifies the arithmetic operations such as addition and subtraction by allowing direct computation without separate sign management, and is more efficient as only one version of zero exists. In signed-magnitude, both positive and negative zero exist, complicating zero arithmetic .

A binary number system represents values by using two possible digits, 0 and 1, which correspond to the off/on states of a switch. Each digit within the binary system is known as a bit, and its position indicates the power of 2 it is associated with. For instance, the binary number (101.11)₂ can be expanded as 2²*1 + 2¹*0 + 2⁰*1 + 2⁻¹*1 + 2⁻²*1, totaling to 5.75 in the decimal system .

Weighted codes assign specific weights to each digit, facilitating processes such as error detection and data compression in digital systems. Examples include the 8421 code, used in calculators and digital watches for its simplicity and ease of conversion between binary and decimal, and reflected codes used in Gray Code for minimal bit changes between numbers. Weighted codes support efficient and reliable data manipulation, especially crucial in applications like data storage and transfer reliability .

Binary Coded Octal (BCO) uses three binary bits to represent each digit of an octal number, making it directly equivalent to the straight binary value of the number. Hence, conversion from octal to BCO is straightforward as it uses the same bits for each octal digit. For example, the octal 25₈ equals binary 010 101₂, and its BCO remains 010 101. This direct mapping simplifies the conversion compared to other number systems .

BCD represents each decimal digit with its binary equivalent, while straight binary uses a binary sequence to represent the entire number. This causes BCD to not align directly with straight binary values. For example, the decimal 25 is 11001 in binary but 0010 0101 in BCD. Unused binary states in BCD exist because it uses only four bits to represent values 0 to 9, leaving states like 1010 to 1111 without assignment, which theoretically can be used for error-checking or other purposes .

You might also like