© GCSE Computing Candidates should be able to: convert positive denary whole numbers (0-255) into 8-bit binary numbers and vice versa add two 8-bit binary integers and explain overflow errors which may occur convert positive denary whole numbers (0-255) into 2-digit hexadecimal numbers and vice versa convert between binary and hexadecimal equivalents of the same number explain the use of hexadecimal numbers to represent binary numbers. Slide 1
© GCSE Computing There are 256 different 8-bit binary numbers: to Each bit represents a different power of 2. One simple method of conversion from binary is therefore to add these powers of 2 for each non-zero bit (1). For example: 8-bit binary therefore converts to denary 157 ( ). Slide 2 Denary equivalent Equivalent power of Binary bits
© GCSE Computing One method is to repeatedly divide the denary number by 2, placing the remainder (0 or 1) below the number and the integer quotient to the left. Example 1: 157 converts to - Example 2: 156 converts to - Example 3: 45 converts to – Note, the 2 extra 0 bits were added to convert the number into an 8-bit binary number. Slide
© GCSE Computing Another method is to repeatedly subtract decreasing powers of 2 from the denary number, starting with 2 7 (128). If the result is zero or positive, place 1 below the number, then place the difference to the right. Otherwise place 0 below the number and copy the number to the right. Repeat until you reach 2 0 (1). Example 1: 157 converts to - Example 2: 45 converts to - Slide