Society & Culture & Entertainment Hobbies & Science

How to Convert a BCD Code to a Different Number Base

    • 1). Write the BCD code for a number you need to convert to a base. The BCD code is a series of 4-bit binary numbers that correspond to each digit in the base number system. For example, using the base 10 or decimal system number 138, the BCD code has 12 bits. Each 4 bits represents a single digit in the decimal number. The first digit is 1 so the BCD code is 0001. The next two digits are composed in the same manner, namely 3 is 0011 and 8 is 1000. The BCD code representation of decimal 138 is 000100111000 or simplified as 100111000.

    • 2). Select the number base into which you want the BCD coded number converted. The most common bases used in computer programming are binary (base 2), octal (base 8) and hexadecimal (base 16).

    • 3). Decode the BCD coded number into decimal format. There is no direct way to convert BCD code to a different base. To write the number in a base of your choosing you must convert from decimal to that base. For example, decode the following BCD coded decimal number (Base 10), 1001011100101001. Convert the BCD code into the decimal number by grouping the bits into sets of 4 bits and then convert each group of four bits into the decimal digit. The four groups are 1001, 0111, 0010 and 1001. These convert to 9729.

    • 4). Divide the decimal number by the value of the base you are converting into. The remainder of the division fills in the least significant position of the result. Divide the integer portion of the result by the value of the base again. The integer portion carries forward and the remainder of the division fills into the next least significant position in the result. This continues until the integer portion is too small to divide by the value of the base. For example, convert 312 decimal into base 4. The following series of calculations will yield the answer in base 4. 312 / 4 = 78 remainder 0. Least significant digit of answer 0. 78 / 4 = 19 remainder 0.5. The next digit in the answer is 4 x 0.5 = 2. 19 / 4 = 4 remainder 0.75. The next digit is 0.75 x 4 = 3. 4 / 4 = 1 remainder 0. The next digit is 0. The next digit in the answer is 1 / 4 = remainder 0.25. The last digit is 0.25 x 4 = 1. Put these together to get the answer, 10320 base 4.

SHARE
RELATED POSTS on "Society & Culture & Entertainment"
Forming Clay for a Pie Pan
Forming Clay for a Pie Pan
How to Make an Arm Chair Remote Holder
How to Make an Arm Chair Remote Holder
How to Make Gifts for Men
How to Make Gifts for Men
The Types of Fish in the Creeks in Pennsylvania
The Types of Fish in the Creeks in Pennsylvania
Which Industries Use Plasma Cutters?
Which Industries Use Plasma Cutters?
How to Make a Crown Out of Clay
How to Make a Crown Out of Clay
How to Preserve Shed Snakeskin
How to Preserve Shed Snakeskin
How to Clean a Browning A-5 Sweet Sixteen
How to Clean a Browning A-5 Sweet Sixteen
What is Silicon Dioxide?
What is Silicon Dioxide?
Gold Refining Techniques
Gold Refining Techniques
How to Calculate 100 G Force
How to Calculate 100 G Force
How to Garden with Tree Cuttings in FFXI
How to Garden with Tree Cuttings in FFXI
How to Calibrate a Sanding Machine
How to Calibrate a Sanding Machine
How to Collect Herpa Miniature Models
How to Collect Herpa Miniature Models
Free DIY Box & Chest Plans
Free DIY Box & Chest Plans
How to Make a NASA Wing Kite
How to Make a NASA Wing Kite
How to Calculate Probability of Defective Light Bulbs
How to Calculate Probability of Defective Light Bulbs
How to Make a Trojan Horse Model
How to Make a Trojan Horse Model
How Are Computers Disposed Of?
How Are Computers Disposed Of?
How to Fire Clay Pots in a Kiln
How to Fire Clay Pots in a Kiln

Leave Your Reply

*