No of bits required for opcode are: 7 bits (2^7=128)
No of bits required for address :19 bits as 512K =2^9*2^10
For single address instruction we just have the opcode and single address .So 7+19=26 bits are required.
For double address instructions we have the opcode and two addresses so 7+19+19=45 bits are required.
Correct me if I am wrong