3. Signed short int i = 0xfffe. What is the decimal number of i? f f f e 1111 1111 1111 1110 1111 1111 1111 1110 --> 0000 0000 0000 0001 0000 0000 0000 0001 + 0000 0000 0000 0010 i = -2 → It is B a. 253 b. -2 c. 254 d. -3 2. Unsigned short int i = 0x00fe. What is the decimal number of i? Ox00fe 00 f e 00 1111 1110 f=15 e=14 (0*16^3) + (0*16^2) + (15 * 16^1) + (14 * 16^0) i = 254 → It is C a. 253 b. -2 c. 254 d. -3

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 21PE
icon
Related questions
Question

Can you check if my asswer is correct.

3. Signed short int i = 0xfffe. What is the decimal number of i?
f f
f
e
1111 1111 1111
1110
1111 1111 1111 1110 --> 0000 0000 0000 0001
0000 0000 0000 0001
+
0000 0000 0000 0010
i = -2 → It is B
a. 253
b. -2
c. 254
d. -3
Transcribed Image Text:3. Signed short int i = 0xfffe. What is the decimal number of i? f f f e 1111 1111 1111 1110 1111 1111 1111 1110 --> 0000 0000 0000 0001 0000 0000 0000 0001 + 0000 0000 0000 0010 i = -2 → It is B a. 253 b. -2 c. 254 d. -3
2. Unsigned short int i = 0x00fe. What is the decimal number of i?
Ox00fe
00 f e
00 1111 1110
f=15
e=14
(0*16^3) + (0*16^2) + (15 * 16^1) + (14 * 16^0)
i = 254 → It is C
a. 253
b. -2
c. 254
d. -3
Transcribed Image Text:2. Unsigned short int i = 0x00fe. What is the decimal number of i? Ox00fe 00 f e 00 1111 1110 f=15 e=14 (0*16^3) + (0*16^2) + (15 * 16^1) + (14 * 16^0) i = 254 → It is C a. 253 b. -2 c. 254 d. -3
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning