rjanociak
Guest
R
Is there a way to put 16 bit inputs into a single 16 bit word address.
The only way I can think of off the top of my head is to:
Add 1 if Bit 1 is high
Add 2 if Bit 2 is high
Add 4 if Bit 3 is high
Add 8 if Bit 4 is high
etc.....
Is there any easier way to do this? I just want something simple without alot of work. It seems that there is an easier way to me that I am overlooking
Bob
The only way I can think of off the top of my head is to:
Add 1 if Bit 1 is high
Add 2 if Bit 2 is high
Add 4 if Bit 3 is high
Add 8 if Bit 4 is high
etc.....
Is there any easier way to do this? I just want something simple without alot of work. It seems that there is an easier way to me that I am overlooking
Bob