Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Generally, you are not going to AND two numbers together that you do or do not know the values of. Instead, you will usually take

Generally, you are not going to AND two numbers together that you do or do not know the values of. Instead, you will usually take a number you DO NOT know and perform a bitwise operation on it with a number that you DO know. The known number above is called a "mask", because it allows you to selectively observe the values of just the bits you are interested in. This can be done to inspect, set, and flip specific bits in the unknown number. In the following problems, the unknown number has all X's, and the known number has all 1's and 0's. Write the answer. Each bit of the answer is either 1, 0, or X, where X is the same bit value as the corresponding bit in the unknown number. 40.) What is XXXXXXXX |11001010? 40.answer) 41.) What is XXXXXXXX &10110110? 41.answer) For the following three questions, remember that bit numbers start numbering from 0, and that hexadecimal numbers are always unsigned. In addition to showing the mask you would use, also show the operation you would use, like so: &0x0020. (i.e., AND the original number with the hexadecimal mask 0x0020.) 42.) Specify the mask you would need to inspect bit 5 of the unknown number. Express it as a 4-digit hexadecimal number. 42.answer) 43.) Specify the mask you would need to set bit 5 of the unknown number to zero. That is, the result of this operation results in a new number, which the unknown number should be subsequently set to. Express it as a 4-digit hexadecimal number. 43.answer) 44.) Specify the mask you would need to set bit 5 of the unknown number to one. That is, the result of this operation results in a new number, which the unknown number should be subsequently set to. Express it as a 4-digit hexadecimal number. 44.answer) 

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

Recommended Textbook for

Inductive Databases And Constraint Based Data Mining

Authors: Saso Dzeroski ,Bart Goethals ,Pance Panov

2010th Edition

1489982175, 978-1489982179

More Books

Students also viewed these Databases questions