Use the bitwise operator "&" like this:
steveCode:mynibble = mybyte & %00001111 'Put the lower 4 bits into mynibble myothernibble = mybyte & %11110000 'Put the upper 4 bytes into myothernibbe
Dohh! Mat beat me to it.![]()
Use the bitwise operator "&" like this:
steveCode:mynibble = mybyte & %00001111 'Put the lower 4 bits into mynibble myothernibble = mybyte & %11110000 'Put the upper 4 bytes into myothernibbe
Dohh! Mat beat me to it.![]()
Last edited by Byte_Butcher; - 12th March 2010 at 15:27. Reason: slow on the draw
Bookmarks