What if there were 4 bits in an op-code?

Coldkilla

Diamond Member
Oct 7, 2004
3,944
0
71
I was wondering, say like a computer's lanquage was made up one day and it had an op-code of 4 or even 8 bits.. how many diff. instruction types could that lanquage have?

 

Coldkilla

Diamond Member
Oct 7, 2004
3,944
0
71
That's what I thought. The 0-1's being the two possibilities to the 4th/8th power. But I wasn't sure wether or not that was correct. Is it?
 

Navid

Diamond Member
Jul 26, 2004
5,053
0
0
You can design the microprocessor so that it fetches multiple words and puts them side by side and treats the result as the effective opcode. So, even if your microprocessor only had a 4-bit data bus, you could still have 8, 12, 16 or 32-bit effective opcodes. It wouldn't be very efficient. But, it would be possible.

A 4-bit word has 16 possibilities. An n-bit word has 2^n possibilities.