10-05-2014, 10:07 PM
Also, you could already have a 1 bit even/odd register already setup that automatically fills with the lowest digit, which you just call for in the program. That knocks out running a conditional check and is faster than the shift technique.
I guess I'll clarify, it's not like a true register, the last line just has a duplicate that goes to it's own read address.
You can also call a bit mask of 00000001 (assuming 8 bit) and if you get a zero, you have an even number.
I guess I'll clarify, it's not like a true register, the last line just has a duplicate that goes to it's own read address.
You can also call a bit mask of 00000001 (assuming 8 bit) and if you get a zero, you have an even number.