a.) Does 2 get printed out to the screen by the following code segment? if so, why is it? i=2; printf("%d\n", (i%3) ? i: 2*i); b.)A and B are both 8-bit values in binary A = 0011 1110 and B= 1101 1010. Compute the following results. Operations Result in binary A|B A^ B A << 2 B>> 3

Electric Motor Control
10th Edition
ISBN:9781133702818
Author:Herman
Publisher:Herman
Chapter22: Sequence Control
Section: Chapter Questions
Problem 6SQ: Draw a symbol for a solid-state logic element AND.
icon
Related questions
Question
a.) Does 2 get printed out to the screen by the following code segment? if so, why is it?
i=2;
printf("%d\n", (i%3) ? i: 2*i);
b.)A and B are both 8-bit values in binary A = 0011 1110 and B= 1101 1010. Compute the following results.
Operations
Result in binary
A | B
A^ B
A << 2
B>> 3
Transcribed Image Text:a.) Does 2 get printed out to the screen by the following code segment? if so, why is it? i=2; printf("%d\n", (i%3) ? i: 2*i); b.)A and B are both 8-bit values in binary A = 0011 1110 and B= 1101 1010. Compute the following results. Operations Result in binary A | B A^ B A << 2 B>> 3
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Logic Gate and Its Application
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, electrical-engineering and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Electric Motor Control
Electric Motor Control
Electrical Engineering
ISBN:
9781133702818
Author:
Herman
Publisher:
CENGAGE L