1 / 11

Session Objectives #8

Session Objectives #8. Number Systems. Starter Number Puzzle: Find a 10-digit number where the first digit is how many zeros in the number, the second digit is how many 1s in the number etc. until the tenth digit, which is how many 9s in the number . 6210001000. Number Systems.

ion
Download Presentation

Session Objectives #8

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Session Objectives#8

  2. Number Systems Starter Number Puzzle: Find a 10-digit number where the first digit is how many zeros in the number, the second digit is how many 1s in the number etc. until the tenth digit, which is how many 9s in the number. 6210001000

  3. Number Systems We already know that computers like to use 0 and 1 to count due to the fact an electrical charge = 1 and no charge = 0. This forms the base 2 or binary system. Instead of base 10, the decimal system (denary) where you have Units, Tens, Hundreds, Thousands etc, we have use multiples of 2: 128 64 32 16 8 4 2 1 0 1 0 0 1 0 1 1 Using a column diagram like this it is easy to turn denary into binary. In this example, 75 is 1 lot 64, 1 lot 8, 1 lot of 2 and 1 lot 1. So the denary number 75 expressed in 8 bit binary is 01001011

  4. Number Systems TASK Now express the following denary numbers as 8 bit binary numbers and show your working. 13 56 143 EXTENSION: Create your own 8 bit binary number and convert back to denary. What is the largest denary number you can create in 8 bit binary? 00001101 00111000 10001111

  5. Position Valued Representation Position valued representation (PVR) is a system to represent any value with a limited number of symbols. Take the decimal system for example, we can represent any value that we need with only 10 symbols (0....9). Examples:100=1......Any number to the 0th power is 1 101=10............Any number to the 1th power is that number 102=100..........10*10 103=1000........10*10*10 104=10000......10*10*10*10 With the PVR system there are a number of rules The number of digits needed for the system is equal to the base. (i.e. decimal (base 10) has 10 digits) The value of the largest digit is one less than the base. The first position to the left of the "base point" is worth 1. (i.e. the decimal point is the base point of the decimal system.) Every other position is worth base times the position value to its immediate right. ow

  6. Octal If binary is a base 2 number system, what would the base be of an octal system? 8 In the octal system the column headings are now changed to: 512 64 8 1 and denary 75 is: 0 1 1 3 These larger base systems are needed for computing larger numbers. TASK: Convert the following denary numbers into octal and remember the PVR rule: The value of the largest digit is one less than the base 263 482 4095 0407 0742 7777

  7. Hexadecimal Some information is stored in computers as numbers in base 16. This is called hexadecimal (or hex for short). The principles are the same except that the digits above 9 are represented by capital letters A – F. TASK: As you can see decimal 10 is A in Hex, so what would the decimal value of hex 10 be?? Discuss...

  8. Hexadecimal The column headings in hex (base 16) would now be: 256 16 1 And 75 denary will be: 4 lots of 16 and 11 ones or 4B. TASK: What will the hex value of 128 be? DISCUSSION ACTIVITY: What is the connection between binary and octal, and between binary and hexadecimal? Try calculating the answers to some more denary number conversions in pairs of binary and octal and then binary and hex. Prepare to discuss anything that you notice.

  9. Why use different systems? This is an obvious question since we know computers like the use of binary. Well, the reason is down to the application or use of the computer. For example, the common QWERTY keyboard is often used for typing text and numbers etc and to enable computers to understand each other a common standard was agreed in the 1960s and the ASCII character set was formed (American Standard Code for Information Interchange). This accounts for all letters + capitals + digits + punctuation etc, 127 characters in total are represented by ASCII codes, within the capability of 8 bits (one byte, used to represent a single character). TASK: Investigate why do we need 8 bits per character, why not 7? ASCII is not always relevant for some applications. HWK – Research the meaning and application of the EBCDIC and UNICODE character sets.

  10. The Application of HEX Why does the 256 (in hex, base 16 to power 2) sound familiar? Each pixel you see in your display is either Red, Green or Blue (RGB) The light intensity of each is changed from 0 to 255 (a byte for each) to determine the colours you see. Colour codes are represented in Hex in a set of 6 digits, 2 for R, 2 for G and 2 for B. Follow the link to see codes for the various colours and then attempt the quiz http://www.nameacolor.com/RGB.HTML

  11. HTML <HTML> <BODY BGCOLOR="#FFFF00"> <P>This is my very first web page!</P> </BODY> </HTML>

More Related