Continue to Site

# 10 bit converter

Status
Not open for further replies.

#### sina-VIP

##### New Member
hi every one
i have this 10 bit binary number that i want to convert it into BCD
i have no idea how
some say i should use a (E)PROM or i should cascade several 74583s
but i have no idea how to program PROM or cascade 74583
and im also open to new ideas about converting

Last edited:

#### MikeMl

##### Well-Known Member
Homework assignment?

#### sina-VIP

##### New Member
Homework assignment?
no it used to be last term at university
now im doing it for self-studying

#### Mr RB

##### Well-Known Member
no it used to be last term at university
now im doing it for SELF-studying

Excellent!

After you studied it yourSELF... You can post here and tell us how it's done.

#### Mikebits

##### Well-Known Member
no it used to be last term at university
now im doing it for self-studying

So do you understand what BCD is? I always thought BCD to be goofy and useless, but I guess it still crops up from time to time.

#### crutschow

##### Well-Known Member
I always thought BCD to be goofy and useless, but I guess it still crops up from time to time.
It makes it easy to display binary information in a digital decimal display. Otherwise displaying binary data in decimal format is rather messy.

#### sina-VIP

##### New Member
Excellent!

After you studied it yourSELF... You can post here and tell us how it's done.
no there's been a misunderstanding
i have studied it a lot
i aint lazy im just rookie
this was a part of a greater project
an 8bit calculator performing the 4 main actions
i had alternative designs too but this was the simplest
the only problem left is the 10bit binary results

Last edited:

#### Mr RB

##### Well-Known Member
Code:
dig1 = dig10 = dig100 = dig1000 = 0;
while(num >= 1000)
{
dig1000 ++;
num -= 1000;
}
while(num >= 100)
{
dig100 ++;
num -= 100;
}
while(num >= 10)
{
dig10 ++;
num -= 10;
}
dig1 = num;

#### blueroomelectronics

##### Well-Known Member
I've been dying to see some sample code for the PIC18F DAW (Decimal Adjust W) instruction.

Status
Not open for further replies.

Replies
4
Views
771
Replies
3
Views
671
Replies
7
Views
671
Replies
3
Views
1K
Replies
5
Views
1K