Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

6. Explain the strengths of a dialectical approach.

Answered: 1 week ago

Question

2. Discuss the types of messages that are communicated nonverbally.

Answered: 1 week ago