• Support PF! Buy your school textbooks, materials and every day products Here!

8 bit BCD and integersplease help

  • Thread starter hime
  • Start date
  • #1
26
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.
 

Answers and Replies

  • #2
33,486
5,175
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?
 
  • #3
26
0
integers 0 to 99..so 100 integers...is this the answer?
 
  • #4
33,486
5,175
Yes.
 
  • #5
26
0
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?
 
  • #6
33,486
5,175
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.
 

Related Threads on 8 bit BCD and integersplease help

Replies
1
Views
9K
Replies
0
Views
4K
  • Last Post
Replies
6
Views
3K
Replies
1
Views
5K
Replies
2
Views
798
  • Last Post
Replies
7
Views
4K
Replies
3
Views
7K
Replies
4
Views
793
Replies
6
Views
1K
  • Last Post
Replies
0
Views
1K
Top