1 / 16

Binary and Decimal Numbers

Binary and Decimal Numbers. CSCI-N 100 Dept. Computer & Information Science. Numbers in computers. Originally designed to crunch numbers Eckert and Mauchly (and scores more) Univ. Penn, Moore School of Elec. Eng. (and lots of other places)

guri
Download Presentation

Binary and Decimal Numbers

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. Binary and Decimal Numbers CSCI-N 100 Dept. Computer & Information Science

  2. Numbers in computers • Originally designed to crunch numbers • Eckert and Mauchly (and scores more) • Univ. Penn, Moore School of Elec. Eng. (and lots of other places) • Long- range firing solutions in WW II (and other problems) • ENIAC (and many more machines and devices)

  3. Power in the numbers • Electrical power into computer • Series of switches opening and closing • Converts analog into digital (self-correcting switches make it high accurate digital device)

  4. Analog Nearly infinite in precision but limited accuracy Digital Limited precision but strongly accurate The divided machine 1 on High Low Off 0

  5. What the computer doesn’t understand • Letters • Graphics • Colors • Characters • Sound • Other types of data

  6. Making the computer understand • Convert what we know to something the computer understands • Converting analog to digital • Switches opening and closing • Open On 1 • Closed Off 0

  7. Making the user understand • Computer sending back information to the user • Converting the 1s and 0s into something the user understands

  8. Calendar Represents movement of the Earth around the Sun Time Represents a given amount of movement of the Earth Clock Temperature Represents Sun’s ray reflecting of Earth surface Interaction of reflective rays with molecule in the atmosphere Excited molecules generate heat Thermometer Representation

  9. The Numbers • Binary – Base 2 • 0, 1 • Decimal – Base 10 • 0 – 9 • Other number bases • Octal – Base 8 (0 – 7) • Hexadecimal – Base 16 (0 – 9, a – f)

  10. How the computer deals with numbers • Real numbers (infinite) • Pi • 1/3 (.3333) • Not enough computer memory • Infinitely precise • Uses round-off error (also called floating point)

  11. Sound, Graphics, Text? • Not represented in a ‘natural’, numeric way • Need to convert bits of information from analog to ‘digital information’

  12. Representing text • Text represented by ASCII • Original ASCII 7-bit character (27 = 128) • Extended ASCII 8-bit character (28 = 256) • Uses Western European English character set • UNICIODE • 65,000 character set coding scheme • Used for languages that use glyphs • Chinese • Arabic • Hebrew • EBCDIC 8-bit code

  13. Representing graphics • Pixel • Dot on in the image assigned numeric value • Translate to monitor • Graphics use hexadecimal coding for use in web pages on the Internet • Red Green Blue (RRGGBB) • GIF, JPG, PNG, BMP, TIF (and lots more)

  14. Representing sound • MIDI (developed 1982 my music industry) • AU (supported by many different software systems over a large range of platforms) • RealAudio (developed by Real Media for Internet use) • AIFF (developedbyApple) • SND (developed by Apple) • MP3 (developed by Moving Pictures Experts Group) • WAVE (developed by IBM and Microsoft)

  15. Base 10 to Base 2 Find the binary number that is EQUAL TO BUT LESS THAN the decimal number, SUBTRACT 23010 6 – 4 = 2 230 – 128 = 102 2 – 2 = 0 102 – 64 = 38 23010 = 111001102 38 – 32 = 6 6 – 16, cannot subtract 6 – 8, cannot subtract

  16. Base 2 to Base 10 ADD the BINARY switches turned on, reading left to right 1111001102 = 48610 256 +128 +64 +32 +0 +0 +4 +2 +0

More Related