The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
66 views
So I'm asked to convert 300 (decimal) into binary and hexadecimal for a single byte (8-bit) unsigned number. I get:

300 = 100101100 = 12C

But isn't 100101100 a 9 digit number, and so a 9-bit number? Am I missing something here?
asked in Digital Logic by Junior (585 points)
retagged by | 66 views

1 Answer

+1 vote
Best answer

So you are trying to store 300 in 8 bit in unsigned number (as I understood by your explanation)

but bro range of 8 bit unsigned is  (0 to 2 ^n -1) here n =8 , than 0 to 255 .

You need 9 bit to store 300 and your both conversion are right .

answered by Loyal (3.4k points)
selected by


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

29,100 questions
36,904 answers
91,826 comments
34,770 users