How Computers Think: Binary, Decimal and Hexadecimal For NYSCPT Summer Institute, NYU 8-16-02 Andrew O’Neill Columbia University.

Slides:



Advertisements
Similar presentations
Number Systems and Codes
Advertisements

Introduction to Computer Engineering by Richard E. Haskell Number Systems Module M3.1 Sections
Binary and Hexadecimal Numbers
©Brooks/Cole, 2003 Chapter 2 Data Representation.
ECE 301 – Digital Electronics Course Introduction, Number Systems, Conversion between Bases, and Basic Binary Arithmetic (Lecture #1)
Data Representation in Computers
Binary Mathematics. Counting system There are three kinds of people in the world: those who can count, and those who can not. - Unknown Wisdom Today’s.
Chapter 1 Number Systems and Codes William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc. Upper Saddle.
Number Systems and Codes In PLC
By.. Miss Prangtip Kaewsuphot
Number Systems.
©Brooks/Cole, 2003 Chapter 2 Data Representation.
Chapter 2 Data Representation. Define data types. Visualize how data are stored inside a computer. Understand the differences between text, numbers, images,
Binary Numbers and ASCII and EDCDIC Mrs. Cueni. Data Representation  Human speech is analog because it uses continuous signals (waves) that vary in strength.
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
Georgia Institute of Technology Introduction to Programming Part 2 Barb Ericson Georgia Institute of Technology May 2006.
Numeration Systems Introduction to Binary, Octal, and Hexadecimal.
EX_01.1/46 Numeric Systems. EX_01.2/46 Overview Numeric systems – general, Binary numbers, Octal numbers, Hexadecimal system, Data units, ASCII code,
Representation of data types. Introduction We are going to look at representing cardinal numbers, integers and real numbers in decimal, binary, octal.
Lecture Binary and Hexadecimal Numbers. How Machines Think Computers handle two types of information: –Instructions –Data The "words" of a machine language.
The Teacher CP4 Binary and all that… CP4 Revision.
CMSC 104, Lecture 051 Binary / Hex Binary and Hex The number systems of Computer Science.
EET 250 Number systems. Introduction to Number Systems While we live in a world where the decimal number is predominant in our lives, computers and digital.
Chapter 2 Data Representation.
©Brooks/Cole, 2003 Chapter 2 Data Representation.
THE BINARY NUMBER SYSTEM “There are only 10 types of people in this world: Those who understand BINARY and those who do not.”
Binary System Presented by Mr. Wilhelmi Internal Representation of Data Input Input  Data that is put into the computer for processing Data Data  The.
Presentation on Number System
Principles & Applications
M204 - Data Representation
Binary 101 Gads Hill School. Aim To strengthen understanding of how computers use the binary number system to store information.
COMPUTER PROGRAMMING I Objective 1.02 Understand Numbering Systems.
ABFC... Home page Introduction Binary number system Hexadecimal number system Binary coded decimal Objectives Octal number system Click.
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.
Numbering Systems and Conversion Understand How Computing Devices Work 1.
 Computers are 2-state devices › Pulse – No pulse › On – Off  Represented by › 1 – 0  BINARY.
CPIT 201 King AbdulAziz University Faculty of Computing & Information Technology Information Technology Department CH 2 Number Systems CPIT 201 Introduction.
Dr. Nermin Hamza 1. Materials Book: Digital Design 4 th M. Morris Mano and Michael D. Ciletti 2.
Lecture Coding Schemes. Representing Data English language uses 26 symbols to represent an idea Different sets of bit patterns have been designed to represent.
Programmable Logic Controller
Binary Representation in Text
Binary Representation in Text
Number Systems and Codes
Unit 18: Computational Thinking
CSCI 198: Lecture 4: Data Representation
BINARY CODE.
CHAPTER 1 : INTRODUCTION
CSCI 161: Lecture 4: Data Representation
2.0 COMPUTER SYSTEM 2.2 Number System and Representation
RFID - EN Encoding information Encoding information J.-D. Chatelain.
Number System conversions
University of Gujrat Department of Computer Science
Computers & Programming Languages
Digital Electronics Ms. Deepa Mehta.
Binary and Hexadecimal Numbers
Binary Lesson 3 Hexadecimal
MAC Address Your Computers Drivers License By Christy Kushner
Binary Lesson 3 Hexadecimal
Binary Lesson 3 Hexadecimal
ECE 301 – Digital Electronics
Objective 1.02 Understand Numbering Systems
Binary Lesson 3 Hexadecimal
Chapter 2 Number Systems.
Chapter 2 Number Systems.
Binary Lesson 4 Hexadecimal and Binary Practice
Chapter 2 Number Systems.
Computer Architecture CST 250
Lecture 36 – Unit 6 – Under the Hood Binary Encoding – Part 2
Chapter 2 Number Systems.
Presentation transcript:

How Computers Think: Binary, Decimal and Hexadecimal For NYSCPT Summer Institute, NYU Andrew O’Neill Columbia University

Introduction ● Why do people and computers think in different ways? ● How do people think about numbers? Where did these ideas come from? ● How do computers use numbers? ● How can we speak the computer's language? ● Two mysteries solved - you too can count to 1000 on two hands!

History of (human) numbers ● 1 st Mystery: The Mesopotamians used a base-60 number system, from which we still use minutes, seconds and degrees. ● Greeks/Romans use base-10, in a different form I II III IV V VI VII VIII IX X, L, C, D, M We have 10 fingers, so this makes sense, right?

● Refined by introduction of zero and the place system - 'decimal' as we know it , 100, – Allows us to deal with very large numbers, and fractions. – Proven successful over time.

How Computers Count ● Computers are logical electronic devices – All data is just a combination of two states 'on' and 'off'. ● These states are called “Binary digITs” (BITS), which can only take a value of 1 or 0. ● Use the place system just like decimal 1 represents decimal 'one', 10 represents decimal 'two'...

Binary - Decimal Comparison

● Maximum different values we can represent with n bits is 2 n. ● One BYTE = 8 BITS ● One BYTE holds 2 n = 256 different values. ● ASCII is a code for most characters between 0 & 255 ● Oh yeah, computers typically start counting at zero!

ASCII Codes in Decimal !034 "035 #036 $037 %038 &039 ' 040 (041 )042 * , / :059 ; ? A066 B067 C068 D069 E070 F071 G 072 H073 I074 J075 K076 L077 M078 N079 O 080 P081 Q082 R083 S084 T085 U086 V087 W 088 X089 Y090 Z091 [092 \093 ]094 ^095 _ 096 `097 a098 b099 c100 d101 e102 f103 g 104 h105 i106 j107 k108 l109 m110 n111 o 112 p113 q114 r115 s116 t117 u118 v119 w 120 x121 y122 z123 {124 |125 }126 ~ to 255 used for non-latin characters...

Hexadecimal ● Base 16 ● Need more symbols than 0,1,...,9 ● A B C D E ● "Ox" notation Ox15 = 16 in decimal (1* = 21)

Bin - Hex – Dec Comparison

So Why Hex? ● Base 16, or 2 4 – Holds as much information as 4 bits – E.g. 0xE is equivalent to binary 1111 ● 1 byte can be represented by 2 hex characters ● Saves writing 8 bits! – Saves space on small screens ● Useful in displaying computer information

Communicating With Our Electronics ● Our electronics board has 4 inputs ● We need to tell it which ones to look for coincidences on

Calculator Demo Counting to 1000

So why base 60? ● Mesopotamians had cool numbers…

Theory #1 ● 60 is the smallest number divisible by 2, 3, 4, and 5. Theory #2 ● Mixing of two civilizations, one with base 5, one with base 12…

Theory #3 ● Three-parts to each finger on right hand = 12 ● Point to one of these 12 parts with one of 5 fingers on left hand ● 5x12 = 60 … Theory # … ● Astronomical, geometrical, yada yada

The Real Reason ● There are 0x3C reasons why the ancient civilizations used base-60!!!