Hello, does anyone know of an integrated circuit or a schematic in which to convert 4-bit binary into packed BCD? I have the following problem with the display on my computer: Code: Decimal Binary Packed BCD 0 0001 0000 0001 <-That is okay 9 1001 0000 1001 <-This is too 10 1010 0000 1010 <-Invalid BCD For binary 1010, it needs to be 0001 0000 I suspect that I will have to use a lot of logic gates to form adders, but I am not too sure. Thank you.
Hmm i've never come accross such an IC, but i've never gone looking. do you need it to do more than carry? you could use a magnitude comparitor and set 1010 as an input. would tell you if it was valid BCD, 10 or >10. you could then use an adder and 2's compliment of 1010 to subject that of the nibble to get the other digit. Bit messy thou, but only a couple of ICs
Your suggestion sounds fine to me. The actual highest number that the computer will display is 15 in decimal or 1111 in binary. Would you happen to have the schematic or know of the website that has the schematic? I would design it myself but I want to get this computer done so that I can have it evaluated. From about a few seconds of thinking... would attaching a tri-state buffer to the middle two bits of the four digit binary and an AND gate to the LSB and MSB work? When the AND gate registers '1', it will remove the CE of the tri-state buffer and redirect the two middle bits to and I am lost from there... Thank you.
yeh sounds like it would work, the magnitude comparitor should be stocked by any half decent lab thou! check: http://www.standardics.philips.com/products/comparators/ also might be worthwhile searching on their site, i've not really got time right now (re-loading PC).
After searching around and cursing about the 74185 being phased out, I found the 74583 adder that will output in BCD with carry. This IC will work except that it seems to be almost phased out as well. The 74283 is also an adder but I am not familiar with the way its logic table is constructed. Does it output in packed BCD or just in binary? Thank you.
I would, in my preferences, do it the hard-wired logic way because I know that I will have to solve this problem again in the future when I am in college for my degree in Electrical Engineering without the aid of PICS and/or programmable logic. I have not utilized a PIC before nor do I have any supplies for programming. The 4-bit computer that this is for will kind of seem ironic if I use a PIC anyway. A much more powerful computer given the job to display the I/O of a less powerful computer is a little weird. Thank you for the suggestion though. I have sighted a source for the 74583 but those come at a premium of 4US dollars each.
also using off the shelf TTL stuff, you can get more speed from this than a PIC could respond to, lets say you use a 16f running at 20mhz, thats a 5mhz instruction cycle, lets say you do your table lookup MOVF PORT ; 1 cycle addwf PCLBASE ; 3 cycles iirc for this might be just 2. ... retlw 'the constant value' ; 2 cycles ... MOVWF PORTOUT; 1 cycle so at best we're looking at 6 cycles, then if we were looping theres a max delay of 3 more. (this is at best still) meaning 9 instruction cycles, which at 5mhz, nocks it back down to almost 500,000khz response rate. the standard logic gates, in fast cmos or TTL can be faster than this. its purely an intelectual thing, so i think it makes sense to Xiachunyi