Answer to Question #314115 in C++ for wali

Question #314115

Memory constrained embedded systems, IoT devices cannot have liberty to use lots of

memory. You are tasked to store the result of a NUCES-FAST student in one single variable. This can

be done using all bits of that variable in an efficient way. Write a program which prompts user to enter

the following student data and convert all this information to store in a single variable (see sample run).

Use bitwise AND, OR and SHIFT operators. Also use if-else where needed. (20 marks)

23-29 (7 bits) Calculus Marks 3-digit value 1010101 (85)

30-36 (7 bits) PF marks 3-digit value 1011100 (92)

37-43 (7 bits) English marks 3-digit value 1001110 (78)

44-50 (7 bits) Physics marks 3-digit value 1000101 (69)

51-52 (2 bits) CGPA – integer part 1-digit value 11 (3)

53-59 (7 bits) CGPA – fractional part 2-digit value 0010110 (22)

60-63 (4 bits) Not used (reserved) 0000

Binary number stored 0000001011011100010110011101011100101010100011010111100001010101

Decimal Equivalent 206138463618955349


1
Expert's answer
2022-03-20T06:21:08-0400
int main() {
    int NUCESFAST = 10;
    int* b = &NUCESFAST;
    cout << &NUCESFAST;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog