Question
1. Assume that x and y are already defined as being of type char. Write a single expression that will return a number whose upper
1. Assume that x and y are already defined as being of type char. Write a single expression that will return a number whose upper four bits are equal to the upper four bits of y and whose lower 4 bits are equal to the lower 4 bits of x. [Note that this compiler doesn't accept binary constants, so use hexidecimal instead. I.e., for 0b00111111 use 0x3F.]
2.Assume that x and y are already defined as being of type char. Write a single expression that will return a number whose lower four bits are equal to the upper four bits of y and whose upper 4 bits are equal to the lower 4 bits of x (nibbles are swapped from previous problem.) [Note that this compiler doesn't accept binary constants, so use hexidecimal instead. I.e., for 0b00111111 use 0x3F.]
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