Answered step by step
Verified Expert Solution
Question
1 Approved Answer
EXERCISES for C++ l ogic operations: predict the result in z after each statement. Always assume that uint8_t PINB = 0x0B; uint8_t x = 0x33;
EXERCISES for C++ logic operations: predict the result in z after each statement. Always assume that
uint8_t PINB = 0x0B;
uint8_t x = 0x33;
int8_t y = 0x82;
uint8_t z;
(a) if (PINB & 1<<5) {
z = 1;
} else {
z = 2;
}
(b) if (y > 0x7A) {
z = 20;
} else {
z = 30;
}
(c) z = x & y;
(d) z = x && y;
(e) z = 0;
while (y < 0) {
++y;
++z;
}
(f) z = 10;
while (x < 0) {
++x;
z += 10;
}
explain your answers please and show the complete code that you would use to find the result with online GDB
Thank you
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