0% found this document useful (0 votes)
14 views10 pages

Overview of Binary Coding Systems

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

Overview of Binary Coding Systems

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

04-07-2024

Binary Codes

Weighted Codes:
● Weighted codes assign different weights to each bit position in a binary number.
● The most common example of a weighted code is the binary-coded decimal (BCD)
system, where each decimal digit is represented by a fixed number of binary bits.
● In BCD, each decimal digit is represented by its binary equivalent, and each digit position
has a specific weight assigned to it. For example, in a 4-bit BCD code, the weights for
each position are 8, 4, 2, and 1, from left to right.
● Weighted codes are commonly used in applications where decimal arithmetic operations
are required, such as in calculators and digital clocks.

[Link]@[Link] 1
04-07-2024

Non-Weighted Codes:
● Non-weighted codes assign equal weight to all bits in a binary number.
● Gray code is an example of a non-weighted code. In Gray code, successive values differ
by only one bit, making it useful in applications where reducing errors during digital
transitions is important, such as in rotary encoders and analog-to-digital converters.
● Another example of a non-weighted code is the excess-3 (XS-3) code, where each
decimal digit is represented by its corresponding 4-bit binary code, but without
weighted positions.

Numeric codes and alphanumeric codes are both methods of representing data in digital form, but they differ in the type
of characters they can represent and their use cases.

Numeric Codes:
● Numeric codes represent data using only numerical digits (0-9).
● These codes are commonly used in applications where only numerical data is required or where
simplicity and efficiency are prioritized.
● Examples of numeric codes include binary-coded decimal (BCD), which represents decimal digits
using binary digits, and Gray codes, which are non-weighted binary codes often used in rotary
encoders and digital communication systems.

[Link]@[Link] 2
04-07-2024

Alphanumeric Codes:
● Alphanumeric codes represent data using a combination of letters (alphabets) and numerical digits.
● These codes are more versatile than numeric codes as they can represent a wider range of
characters and symbols.
● Examples of alphanumeric codes include ASCII (American Standard Code for Information
Interchange) and Unicode, which are widely used for encoding text characters in computers and
communication systems.
● Alphanumeric codes are essential for applications involving text processing, such as word
processing software, databases, and internet communication.

Self-complementing codes

Self-complementing codes, also known as "10's complement" or "9's complement" codes, are a type of
numeric coding scheme where the complement of a number is used to represent negative values. These
codes have a unique property where the complement of a number is calculated with respect to a fixed base,
typically 10 or 9, depending on the specific implementation. Let's take a look at how self-complementing
codes work with an example using a 10's complement system:

[Link]@[Link] 3
04-07-2024

1. Positive Numbers:
● Positive numbers are represented directly using their digits.
● For example, the number 456 would be represented as 456.
2. Negative Numbers:
● Negative numbers are represented by taking the complement of the corresponding positive
number with respect to 10.
● To find the 10's complement of a positive number, subtract each digit from 9.
● For example, to represent -456:
● Start with the positive representation of 456: 456
● Take the complement of each digit with respect to 10:
● 9-4=5
● 9-5=4
● 9-6=3
● So, -456 would be represented as 543.

Cyclic Codes

● Cyclic codes are like magic codes where if you take any word and shift its letters to the left
or right, it still makes sense as a code word.
● For example, if your code word is "ABCDEF" and you shift it to the left by one letter, it
becomes "BCDEFA". This new word is still a valid code word!

[Link]@[Link] 4
04-07-2024

BCD arithmetic

BCD arithmetic

10

[Link]@[Link] 5
04-07-2024

11

12

[Link]@[Link] 6
04-07-2024

13

14

[Link]@[Link] 7
04-07-2024

Excess-3 code

The Excess-3 code, also known as XS-3 or 8421-3, is a non-weighted self-complementing BCD
(Binary-Coded Decimal) code. It is a binary code in which each decimal digit of the original number
is represented by its corresponding 4-bit binary code, incremented by 3.

15

16

[Link]@[Link] 8
04-07-2024

17

18

[Link]@[Link] 9
04-07-2024

Gray code

Gray code, also known as reflected binary code, is a binary numbering system where successive
numbers differ by only one bit. In Gray code, each binary number is designed so that only one bit
changes at a time as you move from one number to the next. This property is useful in applications
where errors in transition between numbers need to be minimized, such as in rotary encoders, digital
communication systems, and analog-to-digital converters. Gray code finds applications in various
fields due to its ability to reduce errors during transitions and simplify digital circuit design.

19

20

[Link]@[Link] 10

You might also like