A question from Microprocessor Systems and Interfacing. Given the following prog
ID: 1846151 • Letter: A
Question
A question from Microprocessor Systems and Interfacing.
Given the following program, what is the hexadecimal value of register X and register Y after the execution of this program? (2 pts)
NUM0: EQU 1
NUMa: EQU 4*4
NUMb: EQU 16<<2
ldx #~NUMb
ldy #NUMa
Fristly, what shold the answer be?
Secondly, here I am wondering that should this 16 in binary be 00010110,which gets by seperating 1 and 6 and get each other's binary number, or shold it be 00010000, which gets by transfer 16 decimal into binary directly?
Also, from my class note, that "<<" means left shift, I don's know what is that mean.
Sorry for my sloppy english, I am international student, please answer me as detail as possible.
Explanation / Answer
16<<2 => 64.
X contains -64 and Y contains 16.
16<<2 means left shift binary notation of 16 by 2 i.e multiply by 2^2=4