40 likes | 255 Views
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
E N D
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. GCSE Computing – Representation of data in computer systems: numbers
There are 256 different 8-bit binary numbers:00000000 to 11111111 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 10011101 therefore converts to denary 157(128 + 16 + 8 + 4 + 1). Converting 8-bit binary numbers into positive denary whole numbers (0-255)
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. Converting positive denary whole numbers (0-255) into 8-bit binary numbers: method 1
Another method is to repeatedly subtract decreasing powers of 2 from the denary number, starting with 27 (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 20 (1). Example 1:157 converts to - Example 2:45 converts to - Converting positive denary whole numbers (0-255) into 8-bit binary numbers – method 2