Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Bitwise logic in assembly is yet another interesting concept! x 8 6 allows you to perform logic operations bit by bit on registers. For the
Bitwise logic in assembly is yet another interesting concept!
x allows you to perform logic operations bit by bit on registers.
For the sake of this example say registers only store bits.
The values in rax and rbx are:
rax
rbx
If we were to perform a bitwise AND of rax and rbx using the
"and rax, rbx instruction, the result would be calculated by
ANDing each bit pair by hence why it's called a bitwise
logic.
So from left to right:
AND
AND
AND
AND
Finally we combine the results together to get:
rax
Here are some truth tables for reference:
AND OR XOR
A B X A B X A B X
Without using the following instructions:
mov, xchg
Please perform the following:
rax rdi AND rsi
ie Set rax to the value of rdi AND rsi
We will now set the following in preparation for your code:
rdi xccbfce
rsi xfbfb
Please give me your assembly in bytes up to x bytes:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started