16 Bit Calculations
Anyone have any reference to some sample programs for a 16 bit calculator that run on SX.
I was able to run an 8 bit, having troble doing 16.
Any help is appriciated.
Thanks,
Mary
Post Edited By Moderator (Bean (Hitt Consulting)) : 11/21/2006 5:09:10 PM GMT
I was able to run an 8 bit, having troble doing 16.
Any help is appriciated.
Thanks,
Mary
Post Edited By Moderator (Bean (Hitt Consulting)) : 11/21/2006 5:09:10 PM GMT
Comments
Nate
What type of calculations do you want to perform ?
P.S. I added a subject line to your post for you.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1
"People who are willing to trade their freedom for·security deserve neither and will lose both." Benjamin Franklin
·
Currently i am trying to figure out how to do addition and subtraction
I am using 8 dip swith button as form of input and 8 LED's as outputs.
·
mary
Still confused...
Can you detail your input?
For example, you have a byte input now, apparently. Do you need to have a word input (2 bytes) and a word result (2 bytes)?
First off, are we talking an infix calculator or RPN?
If it's an infix calculator , then you need a middle step for the operator (e.g. 3 + 5
If it's RPN, then you put the operator at the end (3 ent 5 ent + )
Then you need to devise the input. Are you fixed with only 8 switches for input? How are the operators handled? How is entry handled?
If you need a word input you need to have a means of reading in the byte values twice per 'digit' (MSB/LSB) or have 16 switches.
As far as output, If the result is a word you'll need to somehow come up with how to display 2 bytes on the LED's (e.g. display MSB, pause, display LSB, or use 16 LED's.)
Rodney
I suspect that Mary wants to multiply 8 bits by 8 bits which gives 16 bit results. And Calculator may be a misnomer, she might want to demonstrate binary operation of math calculations.
It does seem that she should consider having 16 leds though. That would require she use an SX-48 to have enough i/o. Of course she could keep the 8 leds and display a high and low byte sequentially and stay with an SX-28.
With a DIP switch, this is certainly not going to be an infix or RPN calculator. That would require 10 numeric keys AND four function keys AND an equal key AND a clear [noparse][[/noparse]is that 16 keys?]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"If you want more fiber, eat the package.· Not enough?· Eat the manual."········
Frank