# 8085 - binary equivalent of MOV and it's corresponding timing diagram

I've got two questions here:

#1

The MOV A,B is said to be a one byte instruction, where B = 000 and A = 111, then MOV should be equal to 00, but, The binary representation of the BC Rp is 00. So, I'm getting confused as to how it is a one byte instruction.

#2 The MVI instruction involves only registers and yet it required a memory read operation:

but, MOV instruction ALSO involves only registers and yet it doesn't require a memory read, WHY?

• Nitpick: it would help to state (in the question's title, or in the exposition) that you mean 8085 specifically. It's only in the tags currently. – anrieff Oct 17 '17 at 11:59

The MVI instruction involves only registers and yet it required a memory read

This is a two byte instruction, where the second byte is directly ternsferred into the destination register. Thus two reads required: Opcode and value.

The MOV A,B is said to be a one byte instruction

MOV does not accept register pairs, its opcode is two bits and the 2 operands are three bits each: One eight bit byte instruction.

MOV should be equal to 00

No, the encoding of MOV A,B is 0170 in octal or 0x78 in hex.

• Considering how an opcode is formed: A=001 and B=111, opcode forming tells that these should be tacked up as: 001111 and there are two bits remaining so that leaves for 4 values all taken by register pairs: HL, BC and DE, how come the hex: 0X78 formed? – mathmaniage Oct 17 '17 at 12:52
• Nope. Instruction format for MOV in binary is 01xxxyyy where x and y are the three operand bits each. – Turbo J Oct 17 '17 at 13:09
• You mean that for one byte instructions these are unique instructions, not following some general rule? – mathmaniage Oct 17 '17 at 13:46
• @BeshalJaenal The instruction is decoded in T4. If it turns out that this decoding determines that another byte (immediate value, for example) is required, then 3 more cycles (another state) are added to get that added byte. An STA will require T1-T4 for the first byte, then three more states (each with T1-T3) for the remaining two reads plus one write. I'm not sure what's confusing for you. – jonk Oct 17 '17 at 18:47
• Ok, I need to know how the MOV A,B is formulated in binary. – mathmaniage Oct 18 '17 at 2:21