Question: I need help creating a function in C NOT C++ with this requirements (5) date_from_binary() Arguments: (1) input: unsigned short integer - date packed into

I need help creating a function in C NOT C++ with this requirements

(5) date_from_binary() Arguments: (1) input: unsigned short integer - date packed into a 16-bit value (2) output: integer - comes back with day value (3) output: integer - comes back with month value (4) output: integer - comes back with year value Function return value: void This function that will unpack the 16-bit binary date value (bit pattern as follows: least significant 7 bits represent year, most significant 5 bits represent day, middle 4 bits represent month) and returns individual values for day, month and year Here is an example of date unpacking: Hex value 0x1184 which represents a binary value 0001000110000100 returns 2 for day, 3 for month, 4 for year

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 Programming Questions!