Searching \ for '[OT] Boolean Eq. for BCD to Binary' in subject line. () Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=boolean+bcd+binary
Search entire site for: 'Boolean Eq. for BCD to Binary'.

Exact match. Not showing close matches.
'[OT] Boolean Eq. for BCD to Binary'
1998\12\08@081220 by  Hi there..

I have to implement 3 digit BCD(000-999,12bit) to binary(0x000-0x3E7)
conversion logic on Vantis CPLD(MACH111).
I need ABEL source code or Boolean Eq.
Anybody knows where I can get it?

Thanks..

Yoon.

Email yiyoon add.co.kr  > I have to implement 3 digit BCD(000-999,12bit) to binary(0x000-0x3E7)
> 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.  If a 12-bit 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--
-ABCD-IJKL
---EFGH---
-----EFGH-

This sum may be performed by using a variety of means; the most ob-
vious would be two use two carry-save 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 sequential-logic (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...)  it mostly depends on the amount of processor time you have to compute the
one very simple method is as follows:

given BCD_high, BCD_low

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
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 LISTSERV MITVMA.MIT.EDU.

-----Original Message-----
From: Marc <marc AARGH.FRANKEN.DE>
To: PICLIST MITVMA.MIT.EDU <PICLIST MITVMA.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(000-999,12bit) to binary(0x000-0x3E7)
>> 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...