Presentation is loading. Please wait.

Presentation is loading. Please wait.

Week 1 - Wednesday.  What did we talk about last time?  Syllabus  Computers.

Similar presentations


Presentation on theme: "Week 1 - Wednesday.  What did we talk about last time?  Syllabus  Computers."— Presentation transcript:

1 Week 1 - Wednesday

2  What did we talk about last time?  Syllabus  Computers

3

4

5  The “brains” of the computer  Fetches instructions and data from memory  Performs computations on the data based on the instructions  Can send results to I/O  A modern CPU is made of electronic circuitry embedded in a small silicon chip

6  How fast are computers?  I typed this PowerPoint on a computer running at 2.6 GHz  That’s 2,600,000,000 cycles per second  Each cycle, your computer can do something like:  Add  Subtract  Multiply  (Usually not divide)

7  “The density of transistors on a CPU doubles every 18 months”  Historically, this has meant that CPU speeds have doubled every 18 months  We can’t make things much faster because of heat and power  We can still put more “stuff” into a CPU  What do we do with that extra stuff?

8  Modern laptops and desktops are now almost all multicore  Multicore means that each CPU actually has several independent processors called cores inside  A CPU with 4 cores can actually be computing 4 different things at the same time  Parallel processing

9  Works well for problems like washing loads of laundry in a laundromat  But, if you have 3 loads of clothes, there is no way to wash them faster with 4 washers 1 1 2 2 3 3

10  Parallel processing works very poorly when different processors have to work on the same data and conflicts can happen  Brain surgery with 100 surgeons is not 20 times faster than brain surgery with 5  It’s not safer, either

11  Storage for all the data and instructions on your computer  Modern computers store everything as binary digits (bits) which have a value of 0 or 1.

12 MemoryWhat Can be StoredMemoryWhat Can be Stored 1 byteOne character, like Q 4 gigabytesA regular movie on DVD 1 kilobyteA poem8 gigabytesAn action movie on DVD 100 kilobytes A short story50 gigabytesA movie on Blue-ray A low resolution photo 1 terabyte Two years of MP3 music 1 megabyte A novel350,000 copies of War and Peace A medium resolution photo250 DVD quality movies A minute of MP3 music85,000 high resolution photos 1 gigabyte Two CD quality albums 24 albums of MP3 music

13 Cache Actually on the CPU Fast and expensive RAM Primary memory for a desktop computer Pretty fast and relatively expensive Flash Drive Faster than hard drives Most commonly on USB keychains Hard Drive Secondary memory for a desktop computer Slow and cheap Optical Drive Secondary memory that can usually only be written once Very slow and very cheap

14 Monitor Common visual output device Speakers Common audio output device Mouse Common input device Keyboard Common input device

15

16  Ultimately, most graphics that we're interested in on a computer are displayed on a screen  A screen is made up of dots  Each dot is called a pixel, short for picture element  Each pixel has a color  By displaying enough pixels, you can make a picture

17  A screen has both a width and a height in pixels  The combination of these is called the resolution of the screen  Higher numbers mean more pixels, allowing a more accurate representation of images DeviceResolution iPhone 4960 x 640 iPhone 61334 × 750 Older monitor1024 x 768 720 HD TV1280 x 720 1080 HD TV1920 x 1080 4K monitor3840 x 2160

18  It's difficult to create programs and video content that looks good on any arbitrary screen size  Many screens have one of three different aspect ratios (the ratio between width and height)  Why are there three different ones? Aspect RatioExampleDevices 4 : 31024 x 768Standard definition TVs, older monitors 16 : 91920 x 1080High definition TVs, many newer monitors 16 : 101280 x 800Some newer monitors

19  Many of you will buy a TV (or a monitor) at some point  HD TVs will all have a 16 : 9 aspect ratio  A 1080 TV has more than twice as many pixels as a 720 TV  Contrast ratio is the ratio between the brightest (maximum white) and the darkest the screen can show  A higher contrast ratio makes a more vibrant image  There are 1080p and 1080i TVs (similar for 720)  p is for progressive and i is for interlaced  Interlaced is an old standard based on how TV signals used to be sent  Progressive is clearer and easier to look at, especially for text

20  In some systems, y starts at 0 at the top of the screen and increases downward  In other systems, y starts at 0 at the bottom of the screen and increases upward  In order to program graphics in a computer, we'll have to think about the screen (or some part of it) as a Cartesian coordinate system

21  For the first few weeks of the semester, we'll be using Scratch to program with  Scratch puts x and y in the middle, with positive and negative values, like a normal Cartesian plane

22

23  Visible light is a form of electromagnetic radiation VIBGYORVIBGYORVIBGYORVIBGYOR

24  Some insects, birds, reptiles, and fish can see beyond our range of colors  Many butterflies and bees see UV patterns on themselves and flowers  Reindeer can find lichen with UV  Boa constrictors and pit vipers can sense infrared heat patterns in their prey  So can piranhas, goldfish, and mosquitoes Black-eyed Susans in normal light Black-eyed Susans in UV

25  We could think of light as a wave with a specific frequency and amplitude  That is a useful way to think of sound  It seems sort of cumbersome for light  Color theorists have discovered that we can represent most visible colors as a combination of a small number of set colors

26

27

28 ColorRedGreenBlueBlack000 Red25500 Green0 0 Blue00 Orange 1650 Gray128 Cyan0255 Magenta 0 Yellow 0 White

29  Unsurprisingly, digital cameras use the RGB model to detect light and record it in a photograph  A sensor called a charge- coupled device (CCD) reads light intensities and converts them to electronic signals  For color photographs, an RGB filter is usually used to register different color intensities separately  A common type of filter, the Bayer mask is shown below  There are twice as many green elements because the human eye is more sensitive to green light

30  The design for a CCD is related to how your eyes work  The rod cells and cone cells in your eyes are responsible for your sight  Rods pick up faint light and are not sensitive to different colors  They are responsible for night and peripheral vision  Cones are less sensitive but pick up different colors  There are L, M, and S cones that pick up long, medium, and short wavelength light, respectively  L-cones pick up reddish light, M-cones pick up greenish light, and S-cones pick up bluish light

31

32  An image is a long list of pixel information  You can think of it as three numbers for each pixel: red, green, and blue values  Bitmaps (.bmp files) are almost that simple  Most common image formats (.jpg,.png, and.gif files) are more complex  They use different forms of compression to keep the image size small

33  Stands for Joint Photographic Experts Group  Good for images without too much high contrast (sharp edges)  Photographs are often stored as JPEGs  Uses crazy math (discrete cosine transform) to reduce the amount of data needed  Lossy compression

34  Good for images with low numbers of colors and high contrast differences  Has built-in compression sort of like zip files  Similar to the older GIF (.gif) images  GIFs are unpopular now because they only support 256 colors  GIFs also suffered from legal battles over the algorithm used for compression  Lossless compression

35

36  We will give an introduction to Scratch  Experiment with it: http://scratch.mit.edu/  Try the Step-by-Step Intro  Lab 1

37  Pick your teams for Project 1 by Friday, September 2  Check out Scratch


Download ppt "Week 1 - Wednesday.  What did we talk about last time?  Syllabus  Computers."

Similar presentations


Ads by Google