Question: i am supposed to write the second function as g being an integer and the length to be lemgth=(int)log2(g)+1 but i do not even know

i am supposed to write the second function as g being an integer and the length to be lemgth=(int)log2(g)+1 but i do not even know where to start to get the function to read the values pertaining to b i am supposed to write the second function as g being an
here is a clearer picture of this integer and the length to be lemgth=(int)log2(g)+1 but i do not even
know where to start to get the function to read the values
pertaining to b here is a clearer picture of this the clearer
the clearer images are posted below here are the guidelines on the function computegreyint(g) must calculate using the math length=(int)log2(g)+1. i do not know how to properly write this function because everytime i try to do it i always popping up with an empty output any help could greatly be appreciated!! thank uou very much! the output is supposed to display the computed result in decimal value i.e. 0101= 5 etc
images are posted below here are the guidelines on the function computegreyint(g)
must calculate using the math length=(int)log2(g)+1. i do not know how to
if someone could show me how to to properly write the second function to properly read from input and using the lemgth=log2(g)+1 portion in it so that i may see exactly how it is done that would be greatly appreciated in c++. like i said i am completely lost on how to do this i have tried reading as a string but that is not the correct way to be done and switching to the int conversion i am completely lost

Input:input will be from the file named "graycodes.dat". The first line of input gives the number of test cases, Nat most 25), test cases follow. Each test case is a line and starts with an Aora B. f the line starts with an A then there will follow 2 integers: number of bits. (1 Se 58) and position *{O SE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!