Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21613 Discussions

making a processor

Altera_Forum
Honored Contributor II
1,095 Views

I am currently working on a processibng machine that will be programmed onto an altera fpga cyclone 2. I have completed the code and found an interesting issue. it is a 16 bit input and output. i can subtract 1 1 1 1 from 5 5 5 5 and get 4 4 4 4 but i cant subtract 1 1 1 1 from 0 0 0 0 and get F F F F here is the code:

i have omitted the clock debouncing modules

0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
369 Views

 

--- Quote Start ---  

i can subtract 1 1 1 1 from 5 5 5 5 and get 4 4 4 4 but i cant subtract 1 1 1 1 from 0 0 0 0 and get F F F F 

--- Quote End ---  

Maybe that is because 0000 minus 1111 equals EEEF not FFFF. 0000 - 0001 would be FFFF.
0 Kudos
Reply