Answered step by step
Verified Expert Solution
Question
1 Approved Answer
greatly appreciate the help This next section of code will consist of logical operations performed on HEX data. Create three unsigned char data types (cVall,
greatly appreciate the help
This next section of code will consist of logical operations performed on HEX data. Create three unsigned char data types (cVall, Val2 and cVal3) and assign eVall and cVal2 HEX values of Ox3C (0b00111100) and 0x22 (0b00100010). respectively. Write a statement that will shift the data in cVall left by 2 spaces and reassign the value to the cVall. Print the result to the console window in HEX format. Verify that the result obtained is correct. Using the cVall result from above, AND the data with cVal2 and store the result in cVall. - Print the result to the console window. Verify the result is correct. OR the current value of cVall with cVal2, storing the result in cVal3. Print the result of cVal3 to the console window. (Note: The result should equal 0x22). Using the increment operator, increase the value in eVal3 by one. Print the result to the console window. Using a compound assignment operator, increment cVal3 by two. Print the result to the console window. Add cVal3 and cVall together. Print the result to the console window (Final result should equal 0x45 if your code is correct) Finally, assign cVall a value of 0b01101000 (0x68) and cVal3 a value of Ob11111111 (0xFF). Using the shift, AND and OR operators, manipulate the data so that bits 3 and 4 are extracted from cVal3 and blended with eVall so that the resulting word in cVall = 0x01101011 (0x6B). TE each printf statement, make sure you add description text to the
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