beginning discrete math help
questin is : what is the largest hex number that can be represented in a register of size 8? Express result in base 10 and in base 8.
^what does it mean register of size 8? o.o
October 1, 2014
10 Comments • Newest first
omg please tell me yall are in college or else I'm screwed
[quote=Invictinite]Wouldn't that be base 16? it says base 8 (octal) and base 10 (decimal)[/quote]
Oh whoops!
Yea, I just saw that person ask if it was 0xffffffff and I had to correct it.
Didn't actually go back and read that it said base 8.
Someone people here need to relearn computer architecture xD
1111 1111 = 255
So to convert to hexadecimal, you do:
255 / 16 = 15 R 15
15 / 16 = 0 R 15
And 15 as you know is F, so it's simply 0xFF in hexadecimal.
You literally do the same for octal so it's:
255 / 8 = 31 R 7
31 / 8 = 3 R 7
3 / 8 = 0 R 3
So in octal, it's 0377
1111 1111
FF
1x2^7+1x2^6+1x2^5+1x2^4+1x2^3+1x2^2+1x2^1+1x2^0= ?
011 111 111
377
[quote=UglierBetty]@Mephisto: just 2 Fs[/quote]
Wouldn't that be base 16? it says base 8 (octal) and base 10 (decimal)
@Mephisto: just 2 Fs
ffffffff?
If I remeber correctly in base 10 the largest number you can represent is 2^(number of bits)-1 sooo (2^8)-1 I THINKKK
Nice to see comp sci peoples
But I agree with what @UglierBetty said
a register is something in a computer that stores data... if a register is of size 8, that means there's 8 flip-flops and so you can store 8 bits.
--> The largest binary number would be 11111111. Convert it to octal*/base-10.
EDIT* - I originally glazed over and thought you said hex because that's more common in what I'm studying than octal.