To convert binary to hex, starting from the low-order bit(working right-to-left), split the binary digits into groups offour-bit nybbles (half-a-byte) and then translate each nybble toits hexadecimal equivalent. This works because there are only 16possible nybbles and we can represent each with a single hexdigit:0000 = 00001 = 10010 = 20011 = 30100 = 40101 = 50110 = 60111 = 71000 = 81001 = 91010 = a1011 = b1100 = c1101 = d1110 = e1111 = fThus, given the binary value 01100011110, we find there are 3four-bit nybbles:011 0001 1110in this case, the high-order nybble has only 3 bits, but wealways assume leading zeroes for any missing bits.Translating these three nybbles to hexadecimal we get:0011 = 3 0001 = 11110 = eThus 01100011110 binary is 31e hexadecimal, which is oftenwritten 0x31e.Converting to octal is similar except we use groups of 3 bitswith the following conversions:000 = 0001 = 1010 = 2011 = 3100 = 4101 = 5110 = 6111 = 7Thus 01100011110 splits into 01 100 011 110 with the followingtranslation:001 = 1100 = 4011 = 3110 = 6Thus 01100011110 binary is 1436 octal which is often written01436.