subject

Consider the storage of timestamp for time of the day in a system. the time stamp format needs/uses 5 bits for seconds/2, 6 bits for minutes and 5 bits for hours (stored as hours-minutes-seconds/2 from msb to lsb format). using these values, seconds/2 may take values from 0 to 31, minutes may take values from 0 to 63, and hours may take values from 0 to 31. in all the three cases, the extra unused values will never be actually used/taken. the total number of bits required to store all the three fields = 5+6+5 = 16. declare three structure-types for the timestamp. first uses unsigned char type for each of the three elements (seconds_by_2, minutes and hours), second uses unsigned int type for each of the three. the third type uses unsigned short and with bit fields specified for each element. print the size of each of the three struct types using sizeof operator for your architecture + compiler. explain the difference if any. which one is better, if any and why ?

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:30
What does a cascading style sheet resolve a conflict over rules for an element? a. the rule affecting the most content wins b. the rule affecting the most content loses c. the rule with the most specific selector loses d. the rule with the most specific selector wins
Answers: 2
question
Computers and Technology, 23.06.2019 00:20
The open systems interconnection (osi) reference model: defines standards for many aspects of computing and communications within a network. is a generic description for how computers use multiple layers of protocol rules to communicate across a network. defines standards for wireless local area network (wlan) communication protocols. details the advantages and disadvantages of various basic network cabling options.
Answers: 1
question
Computers and Technology, 23.06.2019 15:10
What role did women fill during world war ii?
Answers: 1
question
Computers and Technology, 24.06.2019 00:30
Afiling system in which an intermediary source of reference, such as a file card, must be consulted to locate specific files is called a(n) system. a. shelf filing b. direct filing c. indirect filing d. shingling
Answers: 1
You know the right answer?
Consider the storage of timestamp for time of the day in a system. the time stamp format needs/uses...
Questions