CSCI N201 - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

CSCI N201

Description:

Department of Computer and Information Science, IUPUI. Definition of ... Come down to a few basic operations. Simple commands combined into complex instructions ... – PowerPoint PPT presentation

Number of Views:44
Avg rating:3.0/5.0
Slides: 24
Provided by: Lin67
Category:
Tags: csci | coaster | comedown | n201

less

Transcript and Presenter's Notes

Title: CSCI N201


1
  • CSCI N201
  • Programming Concepts and Database
  • 3 Essence of Computing
  • Lingma Acheson
  • linglu_at_iupui.edu

Department of Computer and Information Science,
IUPUI
2
Definition of Computer
  • Universal
  • Information
  • Manipulator

3
Definition of Computer
  • Universal
  • Works with all kinds of information
  • Words, maths, images, videos
  • Performs different tasks
  • Games, create a document read books, long
    distance calls, modify images
  • Very few limitations
  • Do anything with any kind of information

4
Definition of Computer
  • Information
  • Seems to be able to work with anything
  • Actually very limited
  • All translated into 1s and 0s
  • Tiny pieces of data combined into complex
    information

5
Definition of Computer
  • Manipulator
  • Seem able to do anything with data
  • Actually very limited
  • Come down to a few basic operations
  • Simple commands combined into complex instructions

6
Computer and Information
  • Information limited to on/off impulses, like a
    light switch
  • Light switch demo
  • http//wally.cs.iupui.edu/n100/update/binLights.ht
    ml
  • One light switch
  • 1 on, 0 off
  • Two messages Have a lecture class today? (on
    yes off no)
  • Two light switches
  • Switch one Have a lecture class today? (on
    yes off no)
  • Switch two Have a lab class today? (on yes
    off no)
  • How many messages can two switches send?

7
Computer and Information
  • Three light switches
  • Switch one Have a lecture class today? (on
    yes off no)
  • Switch two Have a lab class today? (on yes
    off no)
  • Switch three Have a quiz today? (on yes off
    no)
  • How many messages can two switches send?
  • Adding each extra switch will double the number
    of messages
  • 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, .

8
Computer and Information
  • Related to how computers store information
  • Brick counter demo
  • http//wally.cs.iupui.edu/n100/update/legoMover.ht
    ml
  • Represent 1, 2, 4, 8
  • How to represent other numbers? (0 15)
  • How to represent more numbers?

9
Binary Conversion
  • Converting from binary to base 10
  • Use a spreadsheet
  • E.g. 1 101
  • Brick Demo

10
Binary Conversion
  • E.g. 2 1101
  • E.g. 3 1010
  • Try it yourself!

11
Binary Conversion
  • How are binary numbers related to base 10
    numbers?
  • E.g., 367

12
Binary Conversion
  • Binary numbers, base 2. Able to deal with any
    number with the power of 2
  • Binary 101 122 021 120 5
  • Decimal 101 1102 0101 1100 101

13
Binary Conversion
  • Base 10, 0 9 digits, add more digits as numbers
    grow
  • Base 2, 0 1, add more switches as numbers grow

14
Binary Conversion
  • Converting from base 10 to binary
  • Use a spreadsheet
  • Try it yourself!

15
Binary Conversion
  • Converting from base 10 to binary
  • Large numbers
  • E.g., 34
  • What is the result from using spreadsheet?
  • 34/2 17 with a remainder of 0
  • 17/2 8 with a remainder of 1
  • 8/2 4 with a remainder of 0
  • 4/2 2 with a remainder of 0
  • 2/2 1 with a remainder of 0
  • 1/2 0 with a remainder of 1
  • Result 100010 (get the remainder backwards)
  • E.g. 157

16
Computer Definition Revisit
  • Information
  • Only deal with 1s and 0s
  • Binary conversion readings
  • http//www.cs.iupui.edu/n241/readings/binconv.htm
    l

17
Computer Definition Revisit
  • Operation
  • Very limited
  • Only three logical operations
  • AND, OR, NOT

18
Basic Logic Gates
  • True or False conditions
  • E.g.I have a football. True, False?
  • Why True or False ? 1 or 0
  • Add logic operations
  • E.g. I have a football and a baseball.
  • I have a football or a baseball.
  • I do not have a football.
  • E.g. A hardware device example

19
Basic Logic Gates
  • Truth tables
  • Logical AND

20
Basic Logic Gates
  • Truth tables
  • Logical OR

21
Basic Logic Gates
  • Truth tables
  • Logical NOT

22
Basic Logic Gates
  • These devices are called gates
  • Turning them into electronic devices, we can put
    them together to build electronic circuit boards
    and components, and make computers do different
    jobs, such as adding or subtracting binary
    numbers
  • Everything comes down to the operations of the
    three logic gates

23
Basic Logic Gates
  • Practice
  • If you are a student of computer science, or if
    you are a freshman, you can access the computers
    in this lab.
  • Can I access the computers in this lab if I am a
    first year computer science student?
  • If ((midtermgt80) and (finalgt90)) then gradeA
  • Will Sam get an A if his midterm score is 85
    and final is 89?
  • If (count lt3) then let the user try again.
  • Mary has tried logging to the account three
    times, will she be allowed to try again?
  • If you are taller than 4ft, or you are over 16
    years old, then you can ride the roller coaster.
  • Peter is 15 years old, can he ride the roller
    coaster?
Write a Comment
User Comments (0)
About PowerShow.com