Topic: Binary Encoding – Part 1

Slides:



Advertisements
Similar presentations
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1.
Advertisements

CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall 1.
Binary Representation Introduction to Computer Science and Programming I Chris Schmidt.
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, Java Version, Third Edition.
CS 151 Digital Systems Design Lecture 3 More Number Systems.
Representations Example: Numbers –145 –CVL – –91 –
Introduction to Programming with Java, for Beginners
ECE 301 – Digital Electronics Number Systems and Conversion, Binary Arithmetic, and Representation of Negative Numbers (Lecture #10) The slides included.
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Fourth Edition.
Data Representation in Computers
ENGIN112 L3: More Number Systems September 8, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 3 More Number Systems.
Number Systems Computer Science 210 Computer Organization.
ENEL 111 Digital Electronics Richard Nelson G.1.29
Simple Data Type Representation and conversion of numbers
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
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.
IT253: Computer Organization
Lecture 4 Last Lecture –Positional Numbering Systems –Converting Between Bases Today’s Topics –Signed Integer Representation Signed magnitude One’s complement.
ECE 331 – Digital System Design
Introduction to Computing Dr. Nadeem A Khan. Lecture 10.
CISC1100: Binary Numbers Fall 2014, Dr. Zhang 1. Numeral System 2  A way for expressing numbers, using symbols in a consistent manner.  " 11 " can be.
Data Representation Conversion 24/04/2017.
EEL 3801C EEL 3801 Part I Computing Basics. EEL 3801C Data Representation Digital computers are binary in nature. They operate only on 0’s and 1’s. Everything.
Data Representation, Number Systems and Base Conversions
AEEE2031 Data Representation and Numbering Systems.
 Lecture 2 Processor Organization  Control needs to have the  Ability to fetch instructions from memory  Logic and means to control instruction sequencing.
Number Representation (Part 1) Computer Architecture (Fall 2006)
Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Signed Integers The highest bit indicates the sign. 1 = negative, 0 = positive.
Number Representation Lecture Topics How are numeric data items actually stored in computer memory? How much space (memory locations) is.
1 Digital Logic Design Lecture 2 More Number Systems/Complements.
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,
Number Representation 1 Lecture 2. Outcomes By the end of the session you should: – Understand what bits/bytes/words are. – Understanding conversion between.
ECE DIGITAL LOGIC LECTURE 2: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/14/2016.
DECIMAL, BINARY, AND HEXADECIMAL. Decimal Numbering System Ten symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Represent larger numbers as a sequence of digits.
Topic: Binary Encoding – Part 2
Data Representation COE 308 Computer Architecture
Binary Representation in Text
Computer Science 210 Computer Organization
Invitation to Computer Science, C++ Version, Fourth Edition
Data Representation ICS 233
Data Representation.
Introduction to Computing
ENEL 111 Digital Electronics
Integer Real Numbers Character Boolean Memory Address CPU Data Types
Digital Electronics Jess 2008.
CSE 102 Introduction to Computer Engineering
Number Systems.
University of Gujrat Department of Computer Science
Invitation to Computer Science, Java Version, Third Edition
Data Representation COE 301 Computer Organization
Data Representation in Computer Systems
Subtraction The arithmetic we did so far was limited to unsigned (positive) integers. Today we’ll consider negative numbers and subtraction. The main problem.
Data Representation Conversion 05/12/2018.
Computer Science 210 Computer Organization
Information Representation
There are 10 types of people of people in this world…
COMS 161 Introduction to Computing
Chapter 1 Number System RGGP, Narwana.
COMS 161 Introduction to Computing
Number Representation
Data Representation ICS 233
OBJECTIVES After reading this chapter, the reader should be able to :
Chapter 3 - Binary Numbering System
ENEL 111 Digital Electronics
Lecture 35 – Unit 6 – Under the Hood Binary Encoding – Part 1
Lecture 36 – Unit 6 – Under the Hood Binary Encoding – Part 2
Lecture 37 – Practice Exercises 9
Data Representation COE 308 Computer Architecture
Lecture 37 – Practice Exercises 9
Presentation transcript:

Topic: Binary Encoding – Part 1 CMPT 120 Topic: Binary Encoding – Part 1

Last Lecture File I/O File input -> reading data from a file File output -> writing data to a file

Learning Outcomes At the end of this course, a student is expected to: Manipulate binary encodings of simple data types. Do conversions from binary system to decimal and vice versa Determine the range of representable values within binary system Do additions and incremental counting within binary system Decode/encode a bit string to/from its corresponding value (unsigned, 2's complement, ASCII)

Decimal numeral system Today’s Menu Binary Encoding How characters are represented in computer memory How numbers are represented in computer memory But before to do this, we need to introduce decimal and binary numeral systems Counting and adding numbers in these numeral systems Converting binary numbers <-> decimal numbers Decimal numeral system Binary numeral system

So far, we have seen that … Computer memory: 100100111010010001000100010001000100010001100010010101010100010010010010001000100110010001011011100100100100100100100000000110010100101010101000100100100100010001001100100010110111001001011101001010101010001001011000010100010011001000101101110010010101 010010010010010101001 integer colour floating point number character CPU instruction sound

Sequences of 0’s and 1’s We have already mentioned that Computer hardware functions using two voltage levels See link Computers and Voltage Levels in Week 2 We represent these two voltage levels using 0’s and 1’s As our previous slide demonstrated, what a sequence of 0’s and 1’s represents depends on the context So, let’s have a look at what could a sequence of 0’s and 1’s represent

How characters are represented in computer memory Source: http://1.bp.blogspot.com/_e8aZh22zXKM/TMeR_fFL8aI/AAAAAAAAAAo/pIR08vVLkz0/s320/Hello_World.jpg

Numeral representation of characters (UNICODE) Source: http://www.hki.uni-koeln.de/sites/all/files/courses/5514/1000px-ASCII-Table.jpg

Padding Notice ... From Slide 7: From ASCII Table: H -> 01001000 versus H -> 1001000

How numbers are represented in computer memory Let’s introduce a few numeral systems As we saw in our ASCII table, a character can be expressed in a variety of numeral systems For example: Hexadecimal numeral system Binary numeral system Decimal numeral system Octal numeral system

Decimal numeral system Decimal -> 10 (Base 10) Ten digits: When counting:

Decimal numeral system When adding:

Binary numeral system Binary -> 2 (Base 2) Two digits: Using the symbols of the binary numeral system makes it easier to talk about computer hardware (CPU architecture, CPU instruction set, memory content etc…) Binary -> 2 (Base 2) Two digits: When counting:

Binary numeral system When adding:

Convert binary to decimal First, let’s examine how we read numbers expressed in the decimal numeral system Consider the positional value of each digit in the decimal number below 25014

Convert binary to decimal Applying the same algorithm, let’s convert the following number expressed in binary numeral system to its equivalent in decimal numeral system 01100001

Convert decimal to binary We could use a table and map the binary number to its decimal number equivalent like we did when we mapped characters to their binary number equivalent

Convert decimal to binary Applying the same algorithm as the one described in our reading, let’s convert the following number expressed in decimal numeral system to its equivalent in binary numeral system 213

Decimal numeral system Summary Binary Encoding How characters are represented in computer memory How numbers are represented in computer memory But before to do this, we need to introduce decimal and binary numeral systems Counting and adding numbers in these numeral systems Converting binary numbers <-> decimal numbers Decimal numeral system Binary numeral system

Next Lecture Binary encoding How numbers integers are represented in computer memory Unsigned integers Signed integers Sign and magnitude 1’s complement 2's complement How many values (range of values) can they represent