Question: Question 1 [ 1 5 marks ] Two students who work for a Data Centre have written a program in C + + which is

Question 1[15 marks]
Two students who work for a Data Centre have written a program in C++ which is capable
of converting any number into a 12 bit binary number system. The program has two soft
buttons. The first is Unsigned & second is Signed which indicates the type of number
that is initially entered in the command prompt. For the Signed function the programs
uses the 1s complement approach. These are D0 through to D11 where D0 represents the
most significant bit while D11 the least significant bit.
a) What output would the program give for the inputs (i.),(ii.) & (iii.) in Unsigned Mode.
i.718[2 marks]
ii.19C16[2 marks]
iii. 47610[2 marks]
b) What would be the output for Signed mode with the new inputs (i.),(ii.) & (iii.).
i.-20[2 marks]
ii.+37[2 marks]
iii. -15[2 marks]
do all questions please

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