Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/06/07 17:49
Read: times


 
#142825 - Like this
Responding to: ???'s previous message
Salaam Salim,

It helps if you understand that there is a 1 to 1 correspondence between a nibble of binary (4 bits) and the 16 hexits of hexadecimal numbers.

0b0000 = 0x0
0b0001 = 0x1
0b0010 = 0x2
0b0011 = 0x3
0b0100 = 0x4
0b0101 = 0x5
0b0110 = 0x6
0b0111 = 0x7
0b1000 = 0x8
0b1001 = 0x9
0b1010 = 0xA
0b1011 = 0xB
0b1100 = 0xC
0b1101 = 0xD
0b1110 = 0xE
0b1111 = 0xF

Now if you want to set bits 4 and 6 (remembering that the bits are numbered 0 - 7), you get 0101 0000, which by the table above can be seen to translate into 0x50.

I hope this helps. Good luck,

Joe


List of 9 messages in thread
TopicAuthorDate
in 'mov SCON, #50h' where does the 50 come from?            01/01/70 00:00      
   Simple hex/binary arithmetics            01/01/70 00:00      
      or, rather than add            01/01/70 00:00      
   Comment help the author, too!            01/01/70 00:00      
      That would be the Standards Committe            01/01/70 00:00      
      this is how I do it            01/01/70 00:00      
         As Jan Said            01/01/70 00:00      
   Like this            01/01/70 00:00      
   Thanks for the hlp            01/01/70 00:00      

Back to Subject List