## About how bits per instruction, how it is in RAM??greenspun.com : LUSENET : Steve Heller's books : One Thread |

I'm busy work through : Whos Afraid of c++ and more c++. It's execellant and I like to buy an updated java book as well. I'm now in Who's afraid c++(first book).How do one can determine how many bits needed or taken up by an instruction.?? I understand that to have 32 possibilities of registers can have 5 bits to represent any of these in instruction.

If one do : mov ax,5 then how many bits taken by 'mov' how many bits taken by 'ax' how many bits taken by ',' how many bits taken by '5'

If one do : mov 000,5 then how many bits taken by 'mov' how many bits taken by '000' how many bits taken by ',' how many bits taken by '5'

How does one represent the register address in stead of the RAm(Memory address) [1000] is address is RAM so address of ax is ???

I don't understand how : mov ax,5 gets to -> b8 05 00 in RAM?? How is the instruction bits in RAM?? Does one do a conversion of "b8 05 00" to binary ??? How does the b8 instruction in bits let the CPU know it's a 'mov' instruction??? Does the sequence of bits inside the CPU knows that if an instruction 'mov' of a sequence of bits are received from RAM it do that?? Are the transistors in CPU designed such a way that if it receives instruction or otherway said, if it receives sequence of bits it just respond on the bits it received from RAM.??

Thanks from Francois A du Toit

-- Francois du Toit (francoisa.dutoit@sanlam.co.za), July 18, 2000

Moderation questions? read the FAQ