Download presentation
Presentation is loading. Please wait.
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
The divided machine Analog Digital
Nearly infinite in precision but limited accuracy Digital Limited precision but strongly accurate 1 on High Low Off
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 Closed Off
7
Making the user understand
Computer sending back information to the user Converting the 1s and 0s into something the user understands
8
Representation Calendar Time Temperature
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
9
The Numbers Binary – Base 2 Decimal – Base 10 Other number bases 0, 1
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 (developed by Apple) SND (developed by Apple) MP3 (developed by Moving Pictures Experts Group) WAVE (developed by IBM and Microsoft)
15
Base 10 to Base 2 28 27 26 25 24 23 22 21 20 256 128 64 32 16 8 4 2 1 Find the binary number that is EQUAL TO BUT LESS THAN the decimal number, SUBTRACT – 4 = 2 230 – 128 = – 2 = 0 102 – 64 = = 38 – 32 = 6 6 – 16, cannot subtract 6 – 8, cannot subtract
16
Base 2 to Base 10 28 27 26 25 24 23 22 21 20 256 128 64 32 16 8 4 2 1 ADD the BINARY switches turned on, reading left to right = 256 +128 +64 +32 +0 +4 +2
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.