PIC MICROCONTROLLER
ARCHITECTURE OF 8085
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
____ Instruction is used to swap the nibbles of bytes in PIC.
|
SWAPF
|
|
COMF
|
|
CLRF
|
|
XCHG
|
Explanation:
Detailed explanation-1: -As we know binary of 100 is 01100100. To swap the nibble we split the operation in two parts, in first part we get last 4 bits and in second part we get first 4 bit of a byte. First operation: The expression “data & 0x0F” gives us the last 4 bits of data and result would be 00000100.
Detailed explanation-2: -Hence one nibble has 4 bits, by shifting 4, 4 bits we can swap nibbles of a byte.
Detailed explanation-3: -In computing and digital technology, a nibble is four consecutive binary digits or half of an 8-bit byte. When referring to a byte, it is either the first four bits or the last four bits, which is why a nibble is sometimes referred to as a half-byte.
There is 1 question to complete.