Presentation is loading. Please wait.

Presentation is loading. Please wait.

Agenda Last class: Software and extensions Today: Memory –How computers store data –Number systems –Digitization.

Similar presentations


Presentation on theme: "Agenda Last class: Software and extensions Today: Memory –How computers store data –Number systems –Digitization."— Presentation transcript:

1 Agenda Last class: Software and extensions Today: Memory –How computers store data –Number systems –Digitization

2 Memory Recall: Storage Devices –How does it save info? –What form is the info?

3 Magnetic Tape In cassettes, VCR tapes, records, floppy disks Iron (II) oxide (red) can be magnetized to “save” info Invented: 1933 Physics 12: Electromagnetism!

4 Laser Discs, CD’s, DVD’s CD = Compact Disc –~1980’s DVD = Digital Video Disc –~1995 Uses a laser to read and write data A thin track goes inside to outside –0.0000005 m thick –5000 m long

5 Laser Discs, CD’s, DVD’s The track has bumps –CD players use lasers to read the bumps –That’s why it has shiny colours! Physics 11 topic

6 Memory Chips Uses electric circuits to “save” information –Very complex – not in class

7 What form is the info? How do bumps change to music or video? ???

8 Digitization Change into numbers Computers store info as numbers The number can only be a 0 or 1 –1 bit is a 0 or 1 –1 byte = 8 bits

9 Digitization How can 0 or 1 become –Numbers? 123456789 (Today) –Letters? abcdABCD!@#$ –Colours? –Pictures? –Movies? –Sounds (music, voice)?

10 Digitizing Numbers We use a decimal number system (base 10) –A digit can be 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Computers use a binary system (base 2) (1 bit) –A digit can be 0, 1 –How do you write 2? 3? 4?

11 Converting Numbers Write the number as powers of the base. Eg: 2468 = 2000 + 400 + 60 + 8 or 2 x 10 3 + 4 x 10 2 + 6 x 10 1 + 8 x 10 0 Bing “ decimal to binary” Or go to http://www.wikihow.com/Convert-from- Decimal-to-Binaryhttp://www.wikihow.com/Convert-from- Decimal-to-Binary http://acc6.its.brooklyn.cuny.edu/~gurwitz/ core5/nav2tool.htmlhttp://acc6.its.brooklyn.cuny.edu/~gurwitz/ core5/nav2tool.html

12 Converting Numbers Write the number as powers of the base. Eg: 2468 = 2000 + 400 + 60 + 8 or 2 x 10 3 + 4 x 10 2 + 6 x 10 1 + 8 x 10 0 Change to binary? 2468 = ? x 2 ? + ? x 2 ? + … Can only be 0 or 1

13 Converting Numbers Change to binary? 2468 = ? x 2 ? + ? x 2 ? + … Find the biggest power of 2 less than 2468 Subtract 2468 – 2048 = 420 Find the biggest power of 2 less than 420 Repeat… 2020 1 2121 2 2 4 2323 8 2424 16 2525 32 2626 64 2727 128 2828 256 2929 512 2 10 1024 2 11 2048 2 12 4096

14 Converting Numbers Change 101001 to decimal? _1_ + _0_ + _1_ + _0_ + _0_ + _1_ 2 5 2 4 2 3 2 2 2 1 2 0 1 x 2 5 + 1 x 2 3 + 1 x 2 0 = 32 + 8 + 1 = 41

15 Octal: Base 8 Binary is very long (10011010111011010), so many programs use –Octal (Base 8: 01234567) 2468 = ?x8 ? + ?x8 ? + … –2468 = __ x 8 3 + __ x 8 2 + __ x 8 1 + __ x 8 0 8080 1 8181 8 8282 64 8383 512 8484 4096 Can be 0, 1, 2, 3, 4, 5, 6, 7

16 Hexadecimal: Base 16 Binary is very long (10011010111011010), so many programs use –Hexadecimal (Base 16: 0123456789ABCDEF) 2468 = ?x16 ? + ?x16 ? + … Hex Editor http://www.easycalculation.com/decimal- converter.phphttp://www.easycalculation.com/decimal- converter.php? 16 0 1 16 1 16 16 2 256 16 3 4096 Can be 0123456789ABCDEF

17 DecimalBinaryOctalHexadecimal 0 2 8 10 16 99 Biggest number using 1 byte of memory? Biggest number using 2 bytes of memory?

18 DecimalBinaryOctalHexadecimal 0000 21022 81000108 101012A 16100002010 99110001114363 Biggest number using 1 byte of memory? 11111111 = ? Biggest number using 2 bytes of memory? 1111111111111111 = ?

19 Biggest number using 1 byte of memory? 11111111 = 1x2 0 + 1x2 1 + 1x2 2 + 1x2 3 + 1x2 4 + 1x2 5 + 1x2 6 + 1x2 7 + 1x2 8 1 + 2 + 4 + 8 + 16 + 32 + 64 +128 = 255 –In hexadecimal this takes 2 bits: FF = 15 x 16 0 + 15x16 1 = 15 + 240 = 255 Using 2 bytes = 16 bits of memory? 1+2+4+8+16+32+64+128+256+512+1024+… = 65535 –In hexadecimal this takes 4 bits: FFFF = 15x16 0 + 15x16 1 + 15x16 2 + 15x16 3 = 15 + 240 + 3840 + 61440 = 65535

20 Adding You can change to decimal and then add, or just add them Binary: 10110 + 1101 = ? Octal: 1357 + 246 = ? Hexadecimal: 7A + C4 = ?

21 Adding You can change to decimal and then add, or just add them Binary: 10110 + 1101 = 100011 –22+13=35 Octal: 1357 + 246 = 1625 –751 + 166 = 917 Hexadecimal: 7A + C4 = 13E –122 + 196 = 318

22 Homework Worksheet on binary / octal / hexadecimal numbers Lab 2 mark is in HEXADECIMAL –So it looks like a bad mark, but really…


Download ppt "Agenda Last class: Software and extensions Today: Memory –How computers store data –Number systems –Digitization."

Similar presentations


Ads by Google