Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  The octal representation of an integer is (34... Start Learning for Free
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
  • a)
    226
  • b)
    -98
  • c)
    76
  • d)
    -30
Correct answer is option 'D'. Can you explain this answer?
Verified Answer
The octal representation of an integer is (342)8. If this were to be t...

If we treat this as an 8 bit integer, the first bit becomes sign bit and since it is "1", number is negative. Computer uses 2's complement representation for negative numbers and hence the decimal equivalent will be 
View all questions of this test
Most Upvoted Answer
The octal representation of an integer is (342)8. If this were to be t...
Octal to Decimal Conversion:

To convert an octal number to decimal, we need to multiply each digit of the octal number with 8 raised to the power of its position from the rightmost digit. Then, we add all the products to get the decimal equivalent of the octal number.

Given octal number is (342)8

So, (342)8 = 3 × 8² + 4 × 8¹ + 2 × 8⁰ = 192 + 32 + 2 = 226

Hence, the decimal equivalent of the given octal number is 226.

Eight-bit Integer in 8085 based Computer:

An eight-bit integer can store a range of numbers from 0 to 255 in binary form. In two's complement representation, the range of numbers is from -128 to 127.

Since the decimal equivalent of the given octal number is 226, which is greater than 127, we need to represent it in two's complement form to fit it into an eight-bit integer in an 8085 based computer.

To convert a positive decimal number to two's complement form, we need to represent the number in binary form and then take its one's complement by changing all 0's to 1's and all 1's to 0's. Then, we add 1 to the one's complement to get the two's complement.

Binary representation of 226 is 11100010.

One's complement of 11100010 is 00011101.

Adding 1 to the one's complement, we get the two's complement as 00011110.

Hence, the two's complement representation of 226 in an eight-bit integer in an 8085 based computer is 00011110.

Decimal Equivalent of Two's Complement:

To find the decimal equivalent of a two's complement number, we need to first check its leftmost bit. If the leftmost bit is 0, then the number is positive and its decimal equivalent is the same as its binary representation. If the leftmost bit is 1, then the number is negative and its decimal equivalent is obtained by taking its one's complement, adding 1 to the one's complement, and then multiplying the result by -1.

In the two's complement representation of 226, the leftmost bit is 0, which means the number is positive.

Hence, the decimal equivalent of the given octal number treated as an eight-bit integer in an 8085 based computer is 226.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

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 isa)226b)-98c)76d)-30Correct answer is option 'D'. Can you explain this answer?
Question Description
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 isa)226b)-98c)76d)-30Correct answer is option 'D'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about 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 isa)226b)-98c)76d)-30Correct answer is option 'D'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for 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 isa)226b)-98c)76d)-30Correct answer is option 'D'. Can you explain this answer?.
Solutions for 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 isa)226b)-98c)76d)-30Correct answer is option 'D'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of 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 isa)226b)-98c)76d)-30Correct answer is option 'D'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of 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 isa)226b)-98c)76d)-30Correct answer is option 'D'. Can you explain this answer?, a detailed solution for 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 isa)226b)-98c)76d)-30Correct answer is option 'D'. Can you explain this answer? has been provided alongside types of 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 isa)226b)-98c)76d)-30Correct answer is option 'D'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice 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 isa)226b)-98c)76d)-30Correct answer is option 'D'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev