To do … Web Exercise: Quiz-3, HW#2 Score: update

Slides:



Advertisements
Similar presentations
Lecture 2 Concepts, Terms and Definitions. Display Devices They are divided into a lot of small squares called pixels (“PICture ELements”). Each pixel.
Advertisements

Information Representation
Bits are Not just for Numbers Computers store characters as bits or binary digits. Characters from the English-language keyboard are represented in ASCII.
Connecting with Computer Science, 2e
March 2006Taner Erig - EMU2-1 Metamorphosis of Information How is information represented and how do computers store information?
SNC2D. Primary LIGHT colours are red, green, and blue SECONDARY light colours are created by combining only two of the three primary colours of light.
Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn.
LIS508 lecture 6: output devices Thomas Krichel
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004 “Digits” does not refer only to your 10 fingers…
Capture your favorite image Done by: ms.Hanan Albarigi.
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004 How we represent bits, numbers, letters?
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004 Adding some light to computing ….
Logic Gates II Informatics INFO I101 February 5, 2003 John C. Paolillo, Instructor.
07: Color in Interactive Digital Media
Digital Terminology. Bitmap A representation consisting of rows and columns of dots of a graphic image stored in computer memory. To display a bitmap.
Too much information running through my brain.. We live in the information age. Knowledge comes from careful investigation of information. Information.
Chapter 11 Fluency with Information Technology 4 th edition by Lawrence Snyder (slides by Deborah Woodall : 1.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 14 Introduction to Computer Graphics.
Foundations of Computer Science Computing …it is all about Data Representation, Storage, Processing, and Communication of Data 10/4/20151CS 112 – Foundations.
© 1999 Rochester Institute of Technology Introduction to Digital Imaging.
Logical Circuit Design Week 2,3: Fundamental Concepts in Computer Science, Binary Logic, Number Systems Mentor Hamiti, MSc Office: ,
Color and Resolution Introduction to Digital Imaging.
Color and Vision General Physics. Band of Visible Light ROYGBIV (Red, Orange, Yellow, Green, Blue, Indigo, Violet)
Ch 6 Color Image processing CS446 Instructor: Nada ALZaben.
DIGITAL IMAGE. Basic Image Concepts An image is a spatial representation of an object An image can be thought of as a function with resulting values of.
 Functions package up computation … when do we use them? All the time.  Write some simple code to achieve a goal … 12/20/2015© 2010 Larry Snyder, CSE1.
Elements of Design 1.02 Investigate Design Principles and Elements.
Color.
More Digital Representation Discrete information is represented in binary (PandA), and “continuous” information is made discrete.
Information in Computers. Remember Computers Execute algorithms Need to be told what to do And to whom to do it.
 There are 3 primary colors of light RED, GREEN, & BLUE  When these colors of light are mixed… White Light is produced  This process is called color.
The Visible Spectrum And how we see it. What is Visible Light? The cones in the eye are only sensitive to a narrow range of EM frequencies. Visible Light.
COMP LIT FALL SEMESTER OUTPUT UNIT GET OUT YOUR NOTEBOOKS AND PENS! NO SLEEPING, NO EATING, NO TALKING! LISTEN, LOOK, AND THINK. TAKE NOTES & ASK QUESTIONS.
BITMAPPED IMAGES & VECTOR DRAWN GRAPHICS
AP CSP: Pixelation – B&W/Color Images
Too much information running through my brain.
Chapter 8 & 11: Representing Information Digitally
Images Data Representation.
Data Representation Images.
Image Processing Objectives To understand pixel based image processing
Color Theory.
Digital Logic and Computer Organization
2.01 Understand Digital Raster Graphics
Binary Representation in Audio and Images
Colour theory.
How to Convert Pictures into Numbers
Introduction to Electromagnetic waves, Light, and color
Too much information running through my brain.
Color.
Announcement Tomorrow’s office hr: CANCELLED! Show work!!
COMS 161 Introduction to Computing
Ch2: Data Representation
Colour Theories.
Numbers and their bases
2.01 Understand Digital Raster Graphics
Announcements Mid-Term Exam!! Quiz 5 Again + Quiz 6 Exercise 5
Announcement Function ppt: download again
Two ways to discuss color 1) Addition 2) Subtraction
Chapter 2 Data Representation.
Art Programs Raise Deep Questions
How Computers Store Data
Announcements SGID Feedback! Thank you!! Readings:
Programming Graphic LCD
Output Chapter 6.
Digitization & Processing
Announcements How to save your work? Quiz solution 5/5/2019
Basic Processing … Drawing pictures … It’s not art, it’s fun
WJEC GCSE Computer Science
Announcements Survey feedback: summary Quiz: HW 7:
Announcements Jack group member by Thursday!! Quiz-8? HW10
Presentation transcript:

To do … Web Exercise: Quiz-3, HW#2 Score: update Everyone got a 50! To receive the other 50: FOLLOW INSTRUCTIONS!! Send TA (jack) an email with a link to your homepage: http://students.washington.edu/<YourID> This link should display your home page! You have till next Tuesday to complete this! Quiz-3, HW#2 Score: update 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Bits of Color Adding some light to computing …. Kelvin Sung University of Washington, Bothell (* Use/Modification with permission based on Larry Snyder’s CSE120 from Winter 2011) © Lawrence Snyder 2004

Return To RGB Recall that the screen (and other video displays) use red-green-blue lights, arranged in an array of picture elements, or pixels Coffee Cup Pixels 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Actual Pixels From TFT LCD Display 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Combining Colored Light (RGB) The Amazing Properties of Colored Light! Caution: It doesn’t work like pigment 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

InkJet Printer: CMY In pigment, the color we see is the reflected color from white light; the other colors are absorbed Cyan (0, 1, 1) Yellow (1, 1, 0) Magenta (1, 0, 1) Image credit: Wikipedia: Subtractive Color 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

White, Gray, Black You know that gray is just different degrees of white as the “light is turned down” till we get to black Black = [ 0, 0, 0] 0000 0000 0000 0000 0000 0000 Gray = [128,128,128] 1000 0000 1000 0000 1000 0000 White = [255,255,255] 1111 1111 1111 1111 1111 1111 White-gray-black all have same values for RGB 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Colors Colors use different combinations of RGB Husky Purple Red=160 Green=76 Blue=230 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Positional Notation The RGB intensities are binary numbers Binary numbers, like decimal numbers, use place notation 1101 = 1×1000 + 1×100 + 0×10 + 1×1 = 1×103 + 1×102 + 0×101 + 1×100 except that the base is 2 not 10 1101 = 1×8 + 1×4 + 0×2 + 1×1 = 1×23 + 1×22 + 0×21 + 1×20 Base or radix 1101 in binary is 13 in decimal 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Positional Notation Logic Recall that the place represents a power of the base value d7×107 d7×27 d6×106 d6×26 d5×105 d5×25 d4×104 d4×24 d3×103 d3×23 d2×102 d2×22 d1×101 d1×21 d0×100 d0×20 d7d6d5d4d3d2d1d0 d7d6d5d4d3d2d1d0 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

The Red of HP As A Binary Number Given a binary number, add up the powers of 2 corresponding to 1s 1×27 = 1×128 = 128 0×26= 0×64 = 0 1×25= 1×32 = 32 0×24= 0×16 = 0 0×23= 0×8 = 0 0×22= 0×4 = 0 0×21= 0×2 = 0 0×20= 0×1 = 0 1 0 1 0 0 0 0 0 =160 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Green of HP As A Binary Number Given a binary number, add up the powers of 2 corresponding to 1s 0x27 = 0×128 = 0 1x26 = 1×64 = 64 0x25 = 0×32 = 0 0x24 = 0×16 = 0 1x23 = 1×8 = 8 1x22 = 1×4 = 4 0x21 = 0×2 = 0 0x20 = 0×1 = 0 0 1 0 0 1 1 0 0 =76 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Is It Really Husky Purple? So Husky purple is (160,76,230) which is 1010 0000 0100 1100 1110 0110 160 76 230 Suppose you decide it’s not “red” enough Increase the red by 16 = 1 0000 1010 0000 + 1 0000 1011 0000 Adding in binary is pretty much like adding in decimal 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

A Redder Purple Increase by 16 more 00110 000 Carries 1011 0000 + 1 0000 1100 0000 The rule: When the “place sum” equals the radix or more, subtract radix & carry Check it out online: searching hits 19M times, and all of the p.1 hits are good explanations Original +16 binary addition 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Find Binary From Decimal What is 230 (the Blue of HP)? Fill in the Table: Num Being Converted 230 102 38 6 2 Place Value 256 128 64 32 16 8 4 1 Subtract Binary Num 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Find Binary From Decimal Place number to be converted into the table; fill place value row with decimal powers of 2 Num Being Converted 230 Place Value 256 128 64 32 16 8 4 2 1 Subtract Binary Num 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Find Binary From Decimal Rule: Subtract PV from the number; a positive result gives new number and “1”; otherwise, “0” Num Being Converted 230 Place Value 256 128 64 32 16 8 4 2 1 Subtract Binary Num 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Find Binary From Decimal Rule: Subtract PV from the number; a positive result gives new number and “1”; otherwise, “0” Num Being Converted 230 102 Place Value 256 128 64 32 16 8 4 2 1 Subtract Binary Num 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Find Binary From Decimal Rule: Subtract PV from the number; a positive result gives new number and “1”; otherwise, “0” Num Being Converted 230 102 38 Place Value 256 128 64 32 16 8 4 2 1 Subtract Binary Num 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Find Binary From Decimal Rule: Subtract PV from the number; a positive result gives new number and “1”; otherwise, “0” Num Being Converted 230 102 38 6 Place Value 256 128 64 32 16 8 4 2 1 Subtract Binary Num 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Find Binary From Decimal Rule: Subtract PV from the number; a positive result gives new number and “1”; otherwise, “0” Num Being Converted 230 102 38 6 Place Value 256 128 64 32 16 8 4 2 1 Subtract Binary Num 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Find Binary From Decimal Rule: Subtract PV from the number; a positive result gives new number and “1”; otherwise, “0” Num Being Converted 230 102 38 6 Place Value 256 128 64 32 16 8 4 2 1 Subtract Binary Num 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Find Binary From Decimal Rule: Subtract PV from the number; a positive result gives new number and “1”; otherwise, “0” Num Being Converted 230 102 38 6 2 Place Value 256 128 64 32 16 8 4 1 Subtract Binary Num 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Find Binary From Decimal Rule: Subtract PV from the number; a positive result gives new number and “1”; otherwise, “0” Num Being Converted 230 102 38 6 2 Place Value 256 128 64 32 16 8 4 1 Subtract Binary Num 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Find Binary From Decimal Rule: Subtract PV from the number; a positive result gives new number and “1”; otherwise, “0” Read off the result: 0 1110 0110 Num Being Converted 230 102 38 6 2 Place Value 256 128 64 32 16 8 4 1 Subtract Binary Num 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Summary Each pixel is actually three color dots Each color dot represented by a number A Color: represented by three numbers Binary numbers 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Review on digital representation 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

So, It All Works Because of Digital Key principle of digital encoding: Physically, information is the presence or absence of a phenomenon at a given place and time! Card example: Phenomenon – hole in the card Present – detected by brush making elec contact Absent – brush insulated from electrical source Place – there are several on the card; devices can know the positions Time – hole is permanent representation of info 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

A General Idea Digital Information: Detecting the presence or absence of a phenomenon at a specific place and time: PandA Phenomena: light, magnetism, charge, mass, color, current, … Detecting depends on phenomenon – but the result must be discrete: it was detected or not; there is no option for “sorta there” Place and time apply, but usually default to “obvious” values; not so important to us 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Digital Discussion Alternatives to detecting the hole in a card 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Digital Discussion Alternatives to detecting the hole in a card Sidewalk Memory – squares and rocks 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

Digital Discussion Alternatives to detecting the hole in a card Sidewalk Memory – squares and rocks Other phenomena … CD ROM how it works: http://www.youtube.com/watch?v=ESpL4a08kVE 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

CD ROM … Now we understand how CD ROM work … Remember about the binary numbers … In groups of 3 or 4, how can I store … one number: e.g., the number 125? the resolution of one image: e.g., 800x600? one color: e.g., (125, 125, 125)? one digital photograph? A movie? You see, it is based entirely on binary numbers!! Issues will encounter: How does the computer know where to read on the CD-ROM? (Format) How does the computer know where the first number ends and the second number begins? (Number of bits per number, a fix number!) 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)

To do … Web Exercise: And do CD ROM exercise now! Everyone got a 50! To receive the other 50: FOLLOW INSTRUCTIONS!! Send TA (jack) an email with a link to your homepage: http://students.washington.edu/<YourID> This link should display your home page! You have till next Tuesday to complete this! And do CD ROM exercise now! READ INSTRUCTIONS!! 11/14/2018 Kelvin Sung (Use/modify with permission from © 2010-2012 Larry Snyder, CSE)