edited by
14,324 views
51 51 votes

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

  1. $226$
  2. $-98$
  3. $76$
  4. $-30$

2 Answers

Best answer
75 75 votes
$(3\; 4\; 2)_8 = (011 \; 100 \; 010)_2 = (11100010)_2.$

If we treat this as an 8 bit integer, the first bit becomes sign bit and since it is "1", number is negative. 8085 uses 2's complement representation for integers and hence the decimal equivalent will be $-(00011110)_2 = -30.$

Correct Answer: $D$
edited by
21 21 votes

First, write for each decimal equivalent binary code :

since 8 = 23

write each digit in 3-bit binary 

(342)8 = (011 100 010)2  ignore initial zero 

(342)8 = (226)10 = (11100010)2

since all processor use 2's complement number system(2's complement number system is weighted number system)

so 11100010 is a negative number

11100010 = 100010 = -25 + 2 = -30

correct answer D

Answer:
Position:
Show:

Related questions

49 49 votes
4 answers 4 answers
12.6k
12.6k views
Kathleen asked Sep 25, 2014
12,586 views
Suppose the domain set of an attribute consists of signed four digit numbers. What is the percentage of reduction in storage space of this attribute if it is stored as an...
68 68 votes
8 answers 8 answers
18.8k
18.8k views
Kathleen asked Sep 25, 2014
18,791 views
What happens when a bit-string is XORed with itself $n$-times as shown:$\left[B \oplus (B \oplus ( B \oplus (B \dots n \text{ times}\right]$complements when $n$ is evenco...
27 27 votes
3 answers 3 answers
9.3k
9.3k views
Kathleen asked Sep 26, 2014
9,342 views
Design a synchronous counter to go through the following states:$$1, 4, 2, 3, 1, 4, 2, 3, 1, 4 \dots $$
38 38 votes
2 answers 2 answers
13.6k
13.6k views
Kathleen asked Sep 25, 2014
13,615 views
The function represented by the Karnaugh map given below is$A.B$$AB+BC+CA$$\overline{B \oplus C}$$A.BC$