How Many Integers Can Be Represented in 8-bit BCD?

  • Thread starter Thread starter hime
  • Start date Start date
  • Tags Tags
    Bit Integers
Click For Summary

Discussion Overview

The discussion revolves around how many different integers can be represented in an 8-bit word using binary coded decimal (BCD). It includes aspects of homework problem-solving and mathematical reasoning related to BCD representation.

Discussion Character

  • Homework-related, Mathematical reasoning

Main Points Raised

  • One participant states that BCD is coded in 4 bits, leading to the conclusion that 8 bits can represent 2 BCD digits, but expresses uncertainty about the solution.
  • Another participant clarifies that an 8-bit word can hold two decimal digits, prompting a consideration of how many integers can be represented in two decimal digits.
  • A participant proposes that integers from 0 to 99 can be represented, suggesting a total of 100 integers.
  • Another participant confirms the previous claim that 100 integers can be represented in BCD using 8 bits.
  • One participant extends the discussion to 32 bits, suggesting that it can represent 8 decimal digits in BCD, leading to the conclusion that 10^8 integers can be represented.
  • A later reply agrees with the 32-bit representation and notes that BCD is wasteful compared to other representations, highlighting the difference in the number of integers that can be represented in BCD versus standard binary.

Areas of Agreement / Disagreement

Participants generally agree on the number of integers that can be represented in both 8-bit and 32-bit BCD, but there is an implicit acknowledgment of the inefficiency of BCD representation compared to binary.

Contextual Notes

The discussion does not resolve the implications of using BCD versus binary representation in terms of efficiency or practical applications.

hime
Messages
23
Reaction score
0

Homework Statement


Suppose a computer has 8-bit words. How many different integers can be represented (in decimal) in a single word if the integers are represented in binary coded decimal(BCD)?

Homework Equations



BCD= Binary Coded Decimal

The Attempt at a Solution


BCD is coded in 4 bits so 8bits/4bits =2 but I think its wrong..I do not know how to do this problem.
 
Physics news on Phys.org
So far, so good, but you're not done. An 8-bit word can hold two decimal digits, so how many integers can be represented in two decimal digits?
 
integers 0 to 99..so 100 integers...is this the answer?
 
so if there are 32 bits, we have 8 decimal digits if we code the integers in BCD(4bits/integer). That means, 10^8 integers(0 to 10^8-1) can be represented in BCD with 32 bits. Is this correct?
 
Yes. I should add that BCD is somewhat wasteful. As you have already found, a byte can hold two decimal digits in BCD form, so can represent 100 numbers. On the other hand, the eight bits in a byte can hold one of 256 numbers, either 0 through 255 for unsigned numbers, or -128 through 127 for signed numbers.
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
9
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 3 ·
Replies
3
Views
3K