Binary-Coded Decimal Or BCD | Brilliant Math & Science Wiki (2024)

The best way to learn math and computer science.

Log in with Google

Log in with Facebook

Log in with email

Join using Google

Join using Facebook

Join using email

Reset password New user? Sign up

Existing user? Log in

Arindam Kumar Paul, Greg Kevin, and Mahindra Jain contributed

Contents

  • Definition
  • Examples
  • Types
  • Differences Between BCD And Simple Binary Representation
  • Use Of Binary-Coded Decimal

Definition

BCD or binary-coded decimal is a special kind of representation of a decimal number in binary numbers. In binary-coded decimal each individual digit of a number is converted into a binary number, and then by combining them all, the BCD code is generated. But always remember that a binary-coded decimal is not a binary representation of a decimal number.

Examples

The BCD or binary-coded decimal of the number 15 is 00010101. The 0001 is the binary code of 1 and 0101 is the binary code of 5.

Any single decimal numeral [0-9] can be represented by a four bit pattern. The procedure of encoding digits is called "Natural BCD" (NBCD), where each decimal digit is represented by its corresponding four-bit binary value.

Binary-Coded Decimal Or BCD | Brilliant Math & Science Wiki (1)

Types

Generally there are 2 types of BCD: unpacked and packed.

Unpacked BCD: In the case of unpacked BCD numbers, each four-bit BCD group corresponding to a decimal digit is stored in a separate register inside the machine. In such a case, if the registers are eight bits or wider, the register space is wasted.

Packed BCD: In the case of packed BCD numbers, two BCD digits are stored in a single eight-bit register. The process of combining two BCD digits so that they are stored in one eight-bit register involves shifting the number in the upper register to the left 4 times and then adding the numbers in the upper and lower registers.

There is the another one which is not really considered as BCD:

Invalid BCD: There are some numbers are not considered as BCD. They are 1010, 1011, 1100, 1101, 1110, 1111.

Differences Between BCD And Simple Binary Representation

In simple binary representation of any number we just convert the whole number into its binary form by repeteadly dividing 2 again and again. But in the case of BCD, we need not to do this. If anyone knows the binary representation of the numbers 0 to 9, he/she can make a BCD code of any number because, in BCD, we just convert each individual digit of any number to binary and then write them together.

In the case of 946, the binary representation of this number is 01110110010. Here we convert the total number into its binary form. But when we form the BCD code of the number 946, that'll be

\[9 = 1001, 4 = 0100, 6 = 0110 \Rightarrow 100101000110. \]

Use Of Binary-Coded Decimal

The use of BCD can be summarized as follows:

  • BCD takes more space and more time than standard binary arithmetic.
  • It is used extensively in applications that deal with currency because floating point representations are inherently inexact.
  • Database management systems offer a variety of numeric storage options; “Decimal” means that numbers are stored internally either as BCD or as fixed-point integers
  • BCD offers a relatively easy way to get around size limitations on integer arithmetic.

How many bits would be required to encode decimal numbers 0 to 9999 in straight binary and BCD codes? What would be the BCD equivalent of decimal 27 in 16-bit representation?

  • Total number of decimals to be represented=10 000=104 = 213 29.
  • Therefore, the number of bits required for straight binary encoding = 14.
  • The number of bits required for BCD encoding = 16.
  • The BCD equivalent of 27 in 16-bit representation = 0000000000100111.

Find a decimal number which can be represented with 1's only and no 0's in binary, and takes 4 bits in binary. In other words, if you convert that decimal number into binary, it cannot be like 10101 which does contain 0's. It should only contain a certain number of 1's.

Submit your answer as the sum of digits of the binary-coded decimal of that decimal number.

For binary-coded decimal, read the wiki Binary-Coded Decimal.

Cite as: Binary-Coded Decimal Or BCD. Brilliant.org. Retrieved from https://brilliant.org/wiki/binary-coded-decimal-or-bcd/

Join Brilliant The best way to learn math and computer science. Sign up

Sign up to read all wikis and quizzes in math, science, and engineering topics.

Log in with Google

Log in with Facebook

Log in with email

Join using Google

Join using Facebook

Join using email

Reset password New user? Sign up

Existing user? Log in

Binary-Coded Decimal Or BCD | Brilliant Math & Science Wiki (2024)
Top Articles
When is the Best Time to Post on TikTok (And the worst)
BEP20 Standard: Understanding the Foundation of BSC Tokens
7 C's of Communication | The Effective Communication Checklist
What to Serve with Lasagna (80+ side dishes and wine pairings)
Horoscopes and Astrology by Yasmin Boland - Yahoo Lifestyle
My Boyfriend Has No Money And I Pay For Everything
No Hard Feelings Showtimes Near Metropolitan Fiesta 5 Theatre
360 Training Alcohol Final Exam Answers
O'reilly's In Monroe Georgia
The Best English Movie Theaters In Germany [Ultimate Guide]
How Far Is Chattanooga From Here
Irving Hac
B67 Bus Time
Santa Clara Valley Medical Center Medical Records
Painting Jobs Craigslist
Minecraft Jar Google Drive
Moviesda3.Com
Roll Out Gutter Extensions Lowe's
10 Fun Things to Do in Elk Grove, CA | Explore Elk Grove
Kcwi Tv Schedule
Unionjobsclearinghouse
Dragger Games For The Brain
Brbl Barber Shop
Cowboy Pozisyon
The Collective - Upscale Downtown Milwaukee Hair Salon
3 Ways to Drive Employee Engagement with Recognition Programs | UKG
Shiny Flower Belinda
100 Gorgeous Princess Names: With Inspiring Meanings
Meowiarty Puzzle
Vadoc Gtlvisitme App
Citibank Branch Locations In Orlando Florida
Little Caesars Saul Kleinfeld
Ixlggusd
Slv Fed Routing Number
Gyeon Jahee
Http://N14.Ultipro.com
Ducky Mcshweeney's Reviews
New Gold Lee
Encompass.myisolved
World Social Protection Report 2024-26: Universal social protection for climate action and a just transition
Davis Fire Friday live updates: Community meeting set for 7 p.m. with Lombardo
Miami Vice turns 40: A look back at the iconic series
Coroner Photos Timothy Treadwell
Denise Monello Obituary
Peace Sign Drawing Reference
Academic Notice and Subject to Dismissal
Stosh's Kolaches Photos
Shiftselect Carolinas
A Snowy Day In Oakland Showtimes Near Maya Pittsburg Cinemas
Game Akin To Bingo Nyt
Immobiliare di Felice| Appartamento | Appartamento in vendita Porto San
Elizabethtown Mesothelioma Legal Question
Latest Posts
Article information

Author: Msgr. Refugio Daniel

Last Updated:

Views: 5648

Rating: 4.3 / 5 (74 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Msgr. Refugio Daniel

Birthday: 1999-09-15

Address: 8416 Beatty Center, Derekfort, VA 72092-0500

Phone: +6838967160603

Job: Mining Executive

Hobby: Woodworking, Knitting, Fishing, Coffee roasting, Kayaking, Horseback riding, Kite flying

Introduction: My name is Msgr. Refugio Daniel, I am a fine, precious, encouraging, calm, glamorous, vivacious, friendly person who loves writing and wants to share my knowledge and understanding with you.