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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started