Question: Write a function which returns a 3 2 - bit unsigned integer in which every bit is zero except for a specific range of bits
Write a function which returns a bit unsigned integer in which every bit is zero except for a specific range of bits which are set to one. The function takes two arguments, start and end. You may assume start end Every bit starting from start and ending before end should be and every other bit should be The two arguments both count from the leftmost bit of the number.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
