Hexadecimal numbers are really useful in Computer Science and here is one really practical way that students can actually use to see how ! Hex numbers are used on web pages to set colors and just with some simple HTML, students can manipulate the colour backgrounds of webpages.

Because computers store and handle binary digits (bits) and four bits make one hexadecimal digits or a Nibble! 8 bits is therefore one Byte and 2 Nibbles is also one Byte. Bytes are used to measure memory and storage and are the magic numbers that enable Hex to work its magic!

The Hex magic is that that any four bit number can be represented by one hexadecimal number (as shown in the table below) as a four but number can only go up to a maximum of 15

One bit, can be broken down into 2 X 4 bit numbers (2 nibbles) and each single one of these can also be represented by one hexadecimal number; the 2 parts can be represented by one hexadecimal number for each of the four bit sequences which means 2 X hexadecimal numbers can represent up to 255 (which is the largest number possible using 8 bits!)

Because computers store and handle binary digits (bits) and four bits make one hexadecimal digits or a Nibble! 8 bits is therefore one Byte and 2 Nibbles is also one Byte. Bytes are used to measure memory and storage and are the magic numbers that enable Hex to work its magic!

The Hex magic is that that any four bit number can be represented by one hexadecimal number (as shown in the table below) as a four but number can only go up to a maximum of 15

One bit, can be broken down into 2 X 4 bit numbers (2 nibbles) and each single one of these can also be represented by one hexadecimal number; the 2 parts can be represented by one hexadecimal number for each of the four bit sequences which means 2 X hexadecimal numbers can represent up to 255 (which is the largest number possible using 8 bits!)

The color is defined by its mix of Red, Green and Blue, each of which can be in the range:

0 to 255 (in decimal) , or

00 to FF (in hexadecimal)

Because each of the three colors can have values from 0 to 255 (256 possible values), there are:

256 × 256 × 256 = 2563

= 16,777,216 possible color combinations

(and this is why you see claims of "16 Million Colors" on computer equipment)

The format ("notation") used on web pages is #RRGGBB, where RR is how much Red (using two hexadecimal digits), GG is how much Green, and BB how much Blue.

0 to 255 (in decimal) , or

00 to FF (in hexadecimal)

Because each of the three colors can have values from 0 to 255 (256 possible values), there are:

256 × 256 × 256 = 2563

= 16,777,216 possible color combinations

(and this is why you see claims of "16 Million Colors" on computer equipment)

The format ("notation") used on web pages is #RRGGBB, where RR is how much Red (using two hexadecimal digits), GG is how much Green, and BB how much Blue.

One way to engage students is to see if they can come if up with their own personalised hex colour combination and then out it together into a little poem to remember it but starting with the same stem which can then be shared with the class!

Roses are #FF0000

Violets are #0000FF

..................................

..................................

For more inspiration, the two favourite colours I have found using Hex are these two:

Roses are #FF0000

Violets are #0000FF

..................................

..................................

For more inspiration, the two favourite colours I have found using Hex are these two:

For other ideas for teaching aspects of Computer Science / ICT and Business, click here

hexadecimal_colours.pdf |