Exact match. Not showing close matches.
PICList
Thread
'[OT] Boolean Eq. for BCD to Binary'
1998\12\08@081220
by
Yongil Yoon
Hi there..
I have to implement 3 digit BCD(000999,12bit) to binary(0x0000x3E7)
conversion logic on Vantis CPLD(MACH111).
I need ABEL source code or Boolean Eq.
Anybody knows where I can get it?
Thanks..
Yoon.
Email spam_OUTyiyoonTakeThisOuTadd.co.kr
1998\12\08@145222
by
Marc
> I have to implement 3 digit BCD(000999,12bit) to binary(0x0000x3E7)
> conversion logic on Vantis CPLD(MACH111).
> I need ABEL source code or Boolean Eq.
> Anybody knows where I can get it?
You can ask in comp.arch.fpga  the audience there offers plenty of tips.
1998\12\08@152543
by
John Payson
If a 12bit BCD number is written out as
ABCD EFGH IJKL [a=msb]
it may be converted to binary by multiplying ABCD*100 and EFGH*10,
and then adding those products together with IJKL. Since 10=8+2
and 100=64+32+8, it's possible to rewrite the expression as the sum
of four numbers:
ABCDABCD
ABCDIJKL
EFGH
EFGH
This sum may be performed by using a variety of means; the most ob
vious would be two use two carrysave adders followed by a full carry
adder; this may be overkill given that only one bit position (bit 3)
has terms on all four lines, but should yield reasonable results none
theless.
Note that if a sequentiallogic (rather than combinational) approach is
acceptable, that may simplify things somewhat. The design, however,
would be affected by timing and sequencing requrements; since I don't
know what the requirements are here I wouldn't know where to begin (other
than suggesting that this might be a good application for a PIC...)
1998\12\08@231437
by
Michael Hagberg

it mostly depends on the amount of processor time you have to compute the
answer.
one very simple method is as follows:
given BCD_high, BCD_low
returns answer_high, answer_low
answer = 0;
count = BCD_high // hundreds digit
while ( count )
{
answer = answer + 100; // use a 16 + 8 bit math routine
count
}
count = swap ( BCD_low & 0xF0 ) // tens digit
while ( count )
{
answer = answer + 10; // use a 16 + 8 bit math routine
count
}
count = BCD_low & 0x0F // ones digit
answer = answer + count;
return ( answer );
this may not be the fastest routine, but if you have to processor time the
KISS (Keep it Simple Stupid) will definitely pay off in much less debugging
time.
michael
You may leave the list at any time by writing "SIGNOFF PICLIST" in the
body of a message to .....LISTSERVKILLspam@spam@MITVMA.MIT.EDU.
Original Message
From: Marc <marcKILLspamAARGH.FRANKEN.DE>
To: .....PICLISTKILLspam.....MITVMA.MIT.EDU <EraseMEPICLISTspam_OUTTakeThisOuTMITVMA.MIT.EDU>
Date: Tuesday, December 08, 1998 2:04 PM
Subject: Re: [OT] Boolean Eq. for BCD to Binary
>> I have to implement 3 digit BCD(000999,12bit) to binary(0x0000x3E7)
>> conversion logic on Vantis CPLD(MACH111).
>> I need ABEL source code or Boolean Eq.
>> Anybody knows where I can get it?
More... (looser matching)
 Last day of these posts
 In 1998
, 1999 only
 Today
 New search...