Computer Fluency Binary Systems. Humans Decimal Numbers (base 10) Decimal Numbers (base 10) Sign-Magnitude (-324) Sign-Magnitude (-324) Decimal Fractions.

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

ICS312 Set 2 Representation of Numbers and Characters.
A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
Lecturer: Omid Jafarinezhad Sharif University of Technology Department of Computer Engineering 1 Fundamental of Programming (C) Lecture 2 Number Systems.
Computer Science 101 Binary Systems. Humans Decimal Numbers (base 10) Decimal Numbers (base 10) Sign-Magnitude (-324) Sign-Magnitude (-324) Decimal Fractions.
Representing Data, Pictures, Time, and Size in Computer
Introduction to Programming with Java, for Beginners
Overview Digital Systems, Computers, and Beyond
Data Representation (in computer system) Computer Fundamental CIM2460 Bavy LI.
IT-101 Section 001 Lecture #4 Introduction to Information Technology.
Digital Computers and Information
Information Representation and Number Systems BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
© BYU 02 NUMBERS Page 1 ECEn 224 Binary Number Systems and Codes.
Computer Science 101 Number Systems. Humans Decimal Numbers (base 10) Decimal Numbers (base 10) Sign-Magnitude (-324) Sign-Magnitude (-324) Decimal Fractions.
Number Systems Computer Science 210 Computer Organization.
Bits and Bytes.
©Brooks/Cole, 2003 Chapter 2 Data Representation.
Bits & Bytes: How Computers Represent Data
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 1 – Digital Systems and Information Logic.
Data Representation S2. This unit covers how the computer represents- Numbers Text Graphics Control.
Computer Science 111 Fundamentals of Programming I Number Systems.
Chapter 2 Computer Hardware
Copyright © 2003 by Prentice Hall Module 5 Central Processing Unit 1. Binary representation of data 2. The components of the CPU 3. CPU and Instruction.
Binary Code.
Data Representation.
ECEN2102 Digital Logic Design Lecture 1 Numbers Systems Abdullah Said Alkalbani University of Buraimi.
Fill in the blanks: (1) _________ has only two possible values 0 and 1. (2) There are __________bits in a byte. (3) 1 kilobyte of memory space can store.
1.7 BINARY CODES BCD Code (Binary –Coded Decimal ) BCD Addition
Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 2 – Binary Codes.
ICS312 Set 1 Representation of Numbers and Characters.
CS151 Introduction to Digital Design
Logic Design Dr. Yosry A. Azzam. Binary systems Chapter 1.
Number systems & Binary codes MODULE 1 Digital Logic Design Ch1-2 Outline of Chapter 1  1.1 Digital Systems  1.2 Binary Numbers  1.3 Number-base Conversions.
INTRODUCTION TO COMPUTING LECTURE#04. TRANSFORMING DATA INTO INFORMATION Understands only two states either On or Off  Makes different patterns of 0s.
The Hexadecimal Number System and Memory Addressing ISAT 121.
Positional Notation 642 in base 10 positional notation is:
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.
Chap 1. Digital Computers and Information Fall 2003 Sang-Hoon Oh Mokwon Univ.
Data Representation, Number Systems and Base Conversions
How Computer Represent Data
Data Representation (in computer system). Data Representation How do computers represent data? b The computers are digital Recognize.
Signed Binary Numbers Arithmetic Subtraction – In 2’s-complement form: Example: 1.Take the 2’s complement of the subtrahend (including the sign bit) and.
Systems Architecture, Fourth Edition 1 Data Representation Chapter 3.
Overview 1-1 Information Representation
CS151 Introduction to Digital Design Chapter 1: Digital Systems and Information Lecture 2 1Created by: Ms.Amany AlSaleh.
CS 125 Lecture 3 Martin van Bommel. Overflow In 16-bit two’s complement, what happens if we add =
The Hexadecimal System is base 16. It is a shorthand method for representing the 8-bit bytes that are stored in the computer system. This system was chosen.
09/06/ Data Representation ASCII, Binary Denary Conversion, Integer & Boolean data types.
Fall’ 2014 Lesson - 1 Number System & Program Design CSE 101.
Binary a. express numbers in binary, binary-coded decimal (BCD), octal and hexadecimal;
Chapter 1 – Digital Systems and Information Logic and Computer Design Fundamentals.
Data Representation. In our everyday lives, we communicate with each other using analogue data. This data takes the form of: Sound Images Letters Numbers.
Computer Hardware. 7/23/2016M. Eyadat2 Objectives –Explain why most computers are digital –Describe the role of the ALU –List factors that affect performance.
1.4 Representation of data in computer systems Character.
Some basic concepts underlying computer archi­tecture
Chapter 1 Digital Systems and Binary Numbers
Computer Science 210 Computer Organization
3.1 Denary, Binary and Hexadecimal Number Systems
CSCI 198: Lecture 4: Data Representation
Chapter 1 Digital Systems and Binary Numbers
Computer Science 210 Computer Organization
Information Representation
Number Systems Lecture 2.
How Computers Store Data
Learning Intention I will learn how computers store text.
Option: Data Representation
Option: Data Representation
Digital Representation of Data
Presentation transcript:

Computer Fluency Binary Systems

Humans Decimal Numbers (base 10) Decimal Numbers (base 10) Sign-Magnitude (-324) Sign-Magnitude (-324) Decimal Fractions (23.27) Decimal Fractions (23.27) Letters for text Letters for text

Computers Binary Numbers (base 2) Binary Numbers (base 2) Two’s complement and sign-magnitude Two’s complement and sign-magnitude Binary fractions and floating point Binary fractions and floating point ASCII codes for characters (A  65) ASCII codes for characters (A  65)

Why binary? Computers are ‘electronic’ and use the presence or absence of electricity to provide values Computers are ‘electronic’ and use the presence or absence of electricity to provide values Using decimal would require 10 distinct and reliable voltage levels for each digit. Using decimal would require 10 distinct and reliable voltage levels for each digit. This is not feasible with reasonable reliability and financial constraints. This is not feasible with reasonable reliability and financial constraints. Everything in computer is stored using binary: numbers, text, programs, pictures, sounds, videos,... Everything in computer is stored using binary: numbers, text, programs, pictures, sounds, videos,...

Transistor A transistor is an electronic switch (on/off) and is the basic unit of modern computer processors A transistor is an electronic switch (on/off) and is the basic unit of modern computer processors Two steady states based on voltage levels Two steady states based on voltage levels As of 2015, the highest transistor count in a commercially available CPU (in one chip) is over 4.3 billion transistors, in Intel's 15-core Xeon Ivy Bridge-EX. As of 2015, the highest transistor count in a commercially available CPU (in one chip) is over 4.3 billion transistors, in Intel's 15-core Xeon Ivy Bridge-EX. Change states in billionth of sec Change states in billionth of sec Intel Makes the 3D Transistor Intel Makes the 3D Transistor Intel Makes the 3D Transistor Intel Makes the 3D Transistor

Binary Representations Binary values are represented abstractly by: Binary values are represented abstractly by: digits 0 and 1 digits 0 and 1 words (symbols) False (F) and True (T) words (symbols) False (F) and True (T) words (symbols) Low (L) and High (H) words (symbols) Low (L) and High (H) and words Off and On. and words Off and On. OR …..OR …..

Morse Code Morse Code Binary communications are not a new concept

Decimal: Non-negatives Base 10 Base 10 Uses decimal digits: 0,1,2,3,4,5,6,7,8,9 Uses decimal digits: 0,1,2,3,4,5,6,7,8,9 Positional System - position gives power of the base Positional System - position gives power of the base Example: 3845 = 3x x x x10 0 Example: 3845 = 3x x x x10 0 Positions: … Positions: …543210

Binary: Non-negatives Base 2 Base 2 Uses binary digits (bits): 0,1 Uses binary digits (bits): 0,1 Positional system Positional system Example: 1101 = 1x x x x2 0 Example: 1101 = 1x x x x2 0

Powers of 2: 2 n n2n2n It will be convenient to remember these powers

Base Two The important details about base 2 are that the symbols that you use are 0 and 1. The place values in base 2 are (going from smallest to largest): 2 0 (1) 2 1 (2)2 (4) 2 3 (8) 2 4 (16) 2 5 (32) Change the base 2 number to a base 10 (decimal) number  1 = 1 1  2 = 2 0  4 = 0 0  8 = 0 1  16 = 16 1  32 = Change the base 10 (decimal) number 47 to a base 2 (binary) number. 47  2 = 23 remainder 1 23  2 = 11 remainder1 11  2 = 5 remainder1 5  2 = 2 remainder1 2  2 = 1 remainder0 1  2 = 0 remainder1 47 = Binary Point

Conversions ExternalInternal (Human) (Computer) A ExternalInternal (Human) (Computer) A Humans want to see and enter numbers in decimal. Humans want to see and enter numbers in decimal. Computers must store and compute with bits. Computers must store and compute with bits.

Binary to Decimal Conversion Algorithm: Algorithm: Expand binary number using positional scheme.Expand binary number using positional scheme. Perform computation using decimal arithmetic.Perform computation using decimal arithmetic. Example:  1x x x x x2 0 = = = Example:  1x x x x x2 0 = = = 25 10

Binary Addition One bit numbers: | | 1 10 One bit numbers: | | 1 10 Example (53) (45) (98) Example (53) (45) (98)

Special Powers of (=1024) is Kilo, denoted "K" 2 20 (=1,048,576) is Mega, denoted "M" 2 30 (1,073, 741,824) is Giga, denoted "G" 2 40 (1,099,511,627,776 ) is Tera, denoted “T" Reminder: 8 bits (b) are also called a byte (B) Exercise: what is the most memory (RAM) a 32-bit processor can access? equals what in decimal?

Octal Numbers Base 8 Digits 0,1,2,3,4,5,6,7 Base 8 Digits 0,1,2,3,4,5,6,7 Number does not have so many digits as binary Number does not have so many digits as binary Easy to convert to and from binary Easy to convert to and from binary Often used by people who need to see the internal representation of data, programs, etc. Often used by people who need to see the internal representation of data, programs, etc.

Octal Conversions Octal to Binary Octal to Binary Simply convert each octal digit to a three bit binary number. Simply convert each octal digit to a three bit binary number. Example: = Example: = Binary to Octal Binary to Octal Starting at right, group into 3 bit sections Starting at right, group into 3 bit sections Convert each group to an octal digit Convert each group to an octal digit Example = = Example = =

Hexadecimal Base 16 Digits 0,…,9,A,B,C,D,E,F Base 16 Digits 0,…,9,A,B,C,D,E,F Hexadecimal  Binary Hexadecimal  Binary Just like Octal, only use 4 bits per digit. Just like Octal, only use 4 bits per digit. Example: 98C3 16 = Example: 98C3 16 = Example = = 34EB Example = = 34EB

ASCII Character Codes American Standard Code for Information Interchange (ASCII) American Standard Code for Information Interchange (ASCII) This code is a standard used to represent information sent as character-based data. The Extended ASCII set uses 8-bits to represent: This code is a standard used to represent information sent as character-based data. The Extended ASCII set uses 8-bits to represent: 224 Graphic printing characters.224 Graphic printing characters. 32 Non-printing characters32 Non-printing characters Some non-printing characters are used for text format (e.g. BS = Backspace, CR = carriage return) Some non-printing characters are used for text format (e.g. BS = Backspace, CR = carriage return) ASCII Table - ASCII Table -