Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

a bit confused need help.

Status
Not open for further replies.

saturn13

Technical User
Jun 10, 2000
4
0
0
EU
i have started a course in microprocessor-based computers and need some help.the question is:-<br>in a certain computers memory location, the 8-bit binary number 1011 0101 is stored.<br>what is the equivalent hexadecimal number?<br>what does the represent if it is interpreted as:<br>an unsigned interger?<br>a 2's complement signed interger?<br>a fixed-point fraction where there are 4 bits before and 4 bits after the binary point?<br>a character from the set of ASCII codes, state whether even or odd parity is bieng used?
 
I won't give you the full answer, but the key to the first part is to know that each bit position can be represented a power of 2. ie: in an 8 bit number the bits are labeled as follows:<br>76543210<br><br>so if bit 7 is set to 1 then it is equivilant to 2 raised to the power of 7 or 128 in decimal. Add up all the bits set (first raise to corresponding power) and you'll have your answer in decimal. I can convert from binary to Hex in my head quite easily: Just divide the bits into 4bit groups starting from right to left. Then:<br><br>1111 = F<br>1110 = E<br>1101 = D<br>1100 = C<br>1011 = B<br>1010 = A<br>1001 = 9<br>......etc..... (see the pattern here?)<br>0001 = 1<br>0000 = 0<br><br><br> <p> <br><a href=mailto:Kim_Christensen@telus.net>Kim_Christensen@telus.net</a><br><a href= Page</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top