Express the following # in BCD using six digits

  • Thread starter Thread starter Duderonimous
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around converting the decimal number (99 7126)base10 into Binary-Coded Decimal (BCD) using six digits. Participants explore different methods of conversion, including packed and unpacked BCD representations, and clarify the implications of the six-digit requirement.

Discussion Character

  • Homework-related, Technical explanation, Conceptual clarification, Debate/contested

Main Points Raised

  • One participant initially attempts to convert (99 7126)base10 to base 8 before converting to binary, expressing confusion about the necessity of the six-digit requirement in BCD.
  • Another participant questions whether a 4-bit code counts as one digit in BCD and presents their conversion of (99 7126)base10 to BCD, seeking confirmation on whether it meets the six-digit criterion.
  • There is a clarification that decimal numbers can be represented in either packed BCD (each digit stored in half a byte) or unpacked BCD (each digit stored in a full byte), with examples provided for both formats.
  • Participants discuss the conversion of (43)base10 to BCD, with one participant providing both packed and unpacked representations and seeking feedback on their correctness.
  • Some participants confirm that the packed BCD representation is correct and clarify the distinction between packed and unpacked formats.
  • There is acknowledgment of the unnecessary conversion to base 8, with participants agreeing that focusing on BCD directly is more efficient.

Areas of Agreement / Disagreement

Participants generally agree on the definitions and methods of packed versus unpacked BCD, but there remains some uncertainty regarding the interpretation of the six-digit requirement and how it applies to different representations.

Contextual Notes

Participants express confusion about the six-digit requirement in relation to BCD, indicating that the understanding of what constitutes a digit in this context may vary. The discussion does not resolve the implications of this requirement fully.

Duderonimous
Messages
63
Reaction score
1

Homework Statement


Hello,

Express the following number in BCD using 6 digits:

(99 7126)base10

Homework Equations


Algorithm for changing (99 7126)base10→(N1)base8→(N2)base2

BCD table:
Decimal BCD
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001

The Attempt at a Solution


[/B]
(99 7126)base10→(N1)base8

997126/8=124640R6→d0
124640/8=15580R0→d1
15580/8=1947R4→d2
1947/8=243R3→d3
243/8=30R3→d4
30/8=3R6→d5
3/8=0R3→d6

N1=3633406

(3633406)base8→(N2)base2

N2= 011 110 011 011 100 000 110

In retorspect I realize that the above method is pointless.

I could directly convert the above number from decimal to BCD

but where does the "six-digits" factor. I would have much more then 6 digits when I convert that big number to BCD. Please help.
 
Physics news on Phys.org
Does does a 4 bit code count as 1 digit?

(99 7126)base10 to
(1001 1001 0111 0001 0010 0110)BCD

Does the above answer count as 6 digits in BCD?

The next problem is

(43)base10 to BCD in 6 digits

(0000 0000 0000 0000 0100 0011)BCD

Would this be BCD in 6 digits? Please help. Thanks
 
Last edited:
Duderonimous said:

Homework Statement


Hello,

Express the following number in BCD using 6 digits:

(99 7126)base10

Homework Equations


Algorithm for changing (99 7126)base10→(N1)base8→(N2)base2

BCD table:
Decimal BCD
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001

The Attempt at a Solution


[/B]
(99 7126)base10→(N1)base8

997126/8=124640R6→d0
124640/8=15580R0→d1
15580/8=1947R4→d2
1947/8=243R3→d3
243/8=30R3→d4
30/8=3R6→d5
3/8=0R3→d6

N1=3633406

(3633406)base8→(N2)base2

N2= 011 110 011 011 100 000 110

In retorspect I realize that the above method is pointless.

I could directly convert the above number from decimal to BCD

but where does the "six-digits" factor. I would have much more then 6 digits when I convert that big number to BCD. Please help.
I think you're on the wrong track here and are overthinking this. A decimal number can be converted to either unpacked BCD (each digit of the decimal number is stored in one byte) or packed BCD (each decimal digit stored in half a byte). You don't need to convert your decimal number into octal (base 8).

For example, in packed BCD, 9310 would be 1001 00112. In unpacked BCD 9310 would be 0000 1001 0000 00112.
 
  • Like
Likes   Reactions: Duderonimous
Ok. Then I guess the method I learned in class about converting decimal numbers to BCD is the packed BCD representation. So then could you read my second post? I understand the algorithm and converting to base 8 was unecessary. Is my thinking correct in the second post?
 
Duderonimous said:
Does does a 4 bit code count as 1 digit?

(99 7126)base10 to
(1001 1001 0111 0001 0010 0110)BCD

Does the above answer count as 6 digits in BCD?
Yes, six digits. Your (packed) BCD encoding is correct
Duderonimous said:
The next problem is

(43)base10 to BCD in 6 digits

(0000 0000 0000 0000 0100 0011)BCD

Would this be BCD in 6 digits? Please help. Thanks

Is it supposed to be packed BCD or unpacked BCD? If packed BCD, your answer looks good. If unpacked it would be 0000 0000 0000 0100 0000 0011 in binary.
 
  • Like
Likes   Reactions: Duderonimous
Duderonimous said:
Ok. Then I guess the method I learned in class about converting decimal numbers to BCD is the packed BCD representation. So then could you read my second post? I understand the algorithm and converting to base 8 was unecessary. Is my thinking correct in the second post?
Yes, what you have looks fine, now that you have clarified that you're doing packed BCD.
 
  • Like
Likes   Reactions: Duderonimous
Thank you sir!