Skip to content
Official PYQ · 1998

GATE CS 1998 Q1.17 — Number Representations (Fixed and Floating Point)

Explain with AI

The octal representation of an integer is (342)8(342)_8. If this were to be treated as an eight-bit integer in an 80858085 based computer, its decimal equivalent is

Choose one option
View worked solution

Answer: D

To find the decimal equivalent of the octal number (342)8(342)_8 when treated as an 8-bit signed integer on an 8085-based computer, we follow these steps:

Step 1: Convert the octal number to binary
Each octal digit is represented by 3 bits:

  • 3→0113 \to 011
  • 4→1004 \to 100
  • 2→0102 \to 010
Thus, (342)8=(011100010)2(342)_8 = (011100010)_2.

Step 2: Represent as an 8-bit integer
Since the 8085 is an 8-bit processor, we take the 8 least significant bits (LSBs):8-bit representation=111000102\text{8-bit representation} = 11100010_2

Step 3: Determine the decimal value
In the 8085 microprocessor, signed integers are represented in 2's complement form. Since the most significant bit (MSB) is 11, the number is negative.

To find its magnitude, we take the 2's complement of 11100010211100010_2:

  1. Find the 1's complement: 00011101200011101_2
  2. Add 11: 000111012+1=00011110200011101_2 + 1 = 00011110_2
Converting 00011110200011110_2 to decimal:16+8+4+2=3016 + 8 + 4 + 2 = 30

Since the original MSB was 11, the decimal equivalent is −30-30.

Therefore, the correct option is D.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Number Representations (Fixed and Floating Point) questions