Lecture 35 – Unit 6 – Under the Hood Binary Encoding – Part 1

Slides:



Advertisements
Similar presentations
Technology ICT Option: Data Representation. Data Representation In our everyday lives, we communicate with each other using analogue data. This data takes.
Advertisements

1 Lecture-2 CSIT-120 Spring 2001 Revision of Lecture-1 Introducing Computer Architecture The FOUR Main Elements Fetch-Execute Cycle A Look Under the Hood.
Binary Representation Introduction to Computer Science and Programming I Chris Schmidt.
Review Binary –Each digit place is a power of 2 –Any two state phenomenon can encode a binary number –The number of bits (digits) required directly relates.
Digital Circuit Why Digital Circuit? – Digital signals ( 0 and 1) are very easy to handle with electronic circuits only 2 states needed: Switch ON or OFF,
1 Lecture-2 CS-120 Fall 2000 Revision of Lecture-1 Introducing Computer Architecture The FOUR Main Elements Fetch-Execute Cycle A Look Under the Hood.
Table 1. Software Hierarchy Levels.. Essential Tools An assembler is a program that converts source-code programs into a machine language (object file).
Data Representation (in computer system) Computer Fundamental CIM2460 Bavy LI.
Computer Fluency Binary Systems. Humans Decimal Numbers (base 10) Decimal Numbers (base 10) Sign-Magnitude (-324) Sign-Magnitude (-324) Decimal Fractions.
Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn.
Data vs. Information OUTPUTOUTPUT Information Data PROCESSPROCESS INPUTINPUT There are 10 types of people in this world those who read binary and those.
Representing Information Digitally. Digitization Initially transforming data for computer use Assigning people social security numbers The creation of.
How Computers Work Dr. John P. Abraham Professor UTPA.
Click to edit Master title style Click to edit Master text styles –Second level Third level –Fourth level »Fifth level 1 Today’s Topics How information.
Transforming Data into Information.
Chapter 2 Computer Hardware
Chapter 2 Binary Values and Number Systems. 2 2 Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645,
The Hexadecimal Number System and Memory Addressing ISAT 121.
THE BINARY NUMBER SYSTEM “There are only 10 types of people in this world: Those who understand BINARY and those who do not.”
Data Representation Bits, Bytes, Binary, Hexadecimal.
CS 111 – Sept. 1 Intro to data representation Binary numbers –Convert binary  decimal –Convert decimal  binary Text –ASCII and Unicode Commitment: –For.
Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Signed Integers The highest bit indicates the sign. 1 = negative, 0 = positive.
Data Representation. What is data? Data is information that has been translated into a form that is more convenient to process As information take different.
ECE/CS 352 Digital System Fundamentals© T. Kaminski & C. Kime 1 ECE/CS 352 Digital Systems Fundamentals Spring 2001 Chapter 1 Tom Kaminski & Charles R.
Lecture 6 Excess Notation. Excess 8 notation indicates that the value for zero is the bit pattern for 8, that is 1000 Excess 8 notation indicates that.
Searching Topics Sequential Search Binary Search.
ISNE101 – Introduction to Information Systems & Network Engineering WEEK 2.
Data Representation. How is data stored on a computer? Registers, main memory, etc. consists of grids of transistors Transistors are in one of two states,
Information in Computers. Remember Computers Execute algorithms Need to be told what to do And to whom to do it.
CS 125 Lecture 3 Martin van Bommel. Overflow In 16-bit two’s complement, what happens if we add =
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP
09/06/ Data Representation ASCII, Binary Denary Conversion, Integer & Boolean data types.
Lesson 6 Binary Understand what Binary Code means and apply this knowledge Understand how data is represented using bit systems and be able to change decimal.
Data Representation. In our everyday lives, we communicate with each other using analogue data. This data takes the form of: Sound Images Letters Numbers.
Number Systems Decimal Can you write 12,045 in expanded form? Base? Allowable digits for each place?
Numerical Representation Intro to Computer Science CS1510 Dr. Sarah Diesburg 1.
Nat 4/5 Computing Science Data Representation Lesson 3: Storing Text
Topic: Binary Encoding – Part 2
Computer Science 210 Computer Organization
Binary & Decimal numbers
Topic: Binary Encoding – Part 1
Understanding binary Understanding Computers.
Computer basics.
Consider this number: , Ones (7 ones) Tens (no tens)
CMSC201 Computer Science I for Majors Lecture 22 – Binary (and More)
What is a byte? What is it? How would you use it?
Numerical Representation
Data Encoding Characters.
Representing Data How does a computer represent data?
LING 388: Computers and Language
Numerical Representation
Ch2: Data Representation
Computer Science 210 Computer Organization
Everything that goes on under the hood of a computer is done in binary -- the language of 0s and 1s. If we have only two numbers, it's very easy to represent.
Plan Attendance Files Posted on Campus Cruiser Homework Reminder
How Computers Store Data
Numerical Representation
Time Complexity Lecture 14 Sec 10.4 Thu, Feb 22, 2007.
How Computers Work Part 1 6 February 2008.
The Binary System.
Numeral systems (radix)
Option: Data Representation
Transforming Data into Information
Option: Data Representation
CMPT 120 Lecture 33 – Unit 5 – Internet and Big Data
Lecture 36 – Unit 6 – Under the Hood Binary Encoding – Part 2
Lecture 37 – Practice Exercises 9
Lecture 37 – Practice Exercises 9
Numerical Representation
Dr. Clincy Professor of CS
Presentation transcript:

Lecture 35 – Unit 6 – Under the Hood Binary Encoding – Part 1 CMPT 120 Lecture 35 – Unit 6 – Under the Hood Binary Encoding – Part 1

Homework - What does Big O Notation tell us? What if I have 5 algorithms (or functions) that do the same thing, for example, extract red jelly beans from a bag of multicolour jelly beans Algorithm A -> O(1) Algorithm B -> O(n) Algorithm C -> O(log2 n) Algorithm D -> O(n log2 n) Algorithm E -> O(n!) Which one is the fastest?

Homework – What does Big O Notation tell us? # of comparisons https://en.wikipedia.org/wiki/Big_O_notation

Complexity of Selection Sort Selection Sort looks for the smallest element multiple times, by going through n elements, then n-1 elements, then n-2 elements, … The total number of comparisons is therefore = n + (n-1) + (n-2) + … + 3 + 2 + 1 = n (n + 1) 2 = n2 + n 2 2 Computing scientists mainly care about the highest order term. Therefore we consider selection sort to be quadratic -> O(n2)

Unit 6. Under The Hood Ever wonder how computers represent data? You got it! -> Computers use 0 and 1 to represent everything In this module, we shall discover Why computers use 0 and 1 to represent everything How they do it Binary Numeral System

Unit 6. Under The Hood

Let’s open the hood! Source: http://ryanscomputersystem.blogspot.com/p/data-flow-diagram.html

Main Memory

“Computers use 0 and 1 to represent everything“ Computer memory: 100100111010010001000100010001000100010001100010010101000111111010010010001000100110010001011011100100100100100100100000000110010100101010101000100100100100010001001100100010110111001001011101001010101010001001011000010100010011001000101101110010010101 010010010010010101001 integer colour floating point number character CPU instruction sound

Why the 0’s and the 1’s Fundamentally, digital computers are machines that convert high and low electrical signals (called voltage) into 0’s and 1’s. Let’s learn to speak its native language!

Decimal numeral system Binary numeral system Decimal -> 10 (Base 10) Ten symbols (digits): Positional system When counting: Binary -> 2 (Base 2) Two symbols (bits): (bits -> binary digits) Positional system When counting:

How computers represent characters Source: http://1.bp.blogspot.com/_e8aZh22zXKM/TMeR_fFL8aI/AAAAAAAAAAo/pIR08vVLkz0/s320/Hello_World.jpg See ASCII Table: https://www.ascii-code.com/

How computers represent integers Which integer is : bit byte A bit either contains a 0 or 1 A byte is 8 bits

Next Lecture More about Binary Numeral System Binary -> Decimal Decimal -> Binary