Download presentation
Presentation is loading. Please wait.
Published byJasmin Lynch Modified over 9 years ago
1
© 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
2
© GCSE Computing 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). Slide 2 Denary equivalent1286432168421 Equivalent power of 22727 2626 2525 2424 23232 2121 2020 Binary bits11111111 1286432168421 10011101 12800168401
3
© 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 3 1249193978157 10011101 1249193978156 10011100 125112245 00101101
4
© 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 4 1286432168421 15729 13511 10011101 1286432168421 45 13 511 00101101
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.