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, 21.06.2019 15:10
Awould be a misconfiguration of a system that allows the hacker to gain unauthorized access, whereas is a combination of the likelihood that such a misconfiguration could happen, a hacker’s exploitation of it, and the impact if the event occurred.
Answers: 3
question
Computers and Technology, 22.06.2019 17:30
The forerunner to cell phones, pdas, and smartphones was
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
Which of the following is not a source of sustainable raw materials? a) coal mine b) flick of sheep c) cotton plantation d) line forest.
Answers: 2
question
Computers and Technology, 23.06.2019 05:00
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most?
Answers: 2
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
question
Mathematics, 26.08.2020 18:01
question
History, 26.08.2020 18:01
question
Social Studies, 26.08.2020 18:01
question
Mathematics, 26.08.2020 18:01
question
Mathematics, 26.08.2020 18:01
Questions on the website: 13722361