Number Systems 2.1 Information Storage Why not decimal numbers in computers ? Difficult to store ENIAC (1 st electronic computer) used 10 vacuum tubes.

Slides:



Advertisements
Similar presentations
Lab #1 Follow-Up Unix Binary / Hexadecimal Python.
Advertisements

DATA REPRESENTATION CONVERSION.
Lecturer: Omid Jafarinezhad Sharif University of Technology Department of Computer Engineering 1 Fundamental of Programming (C) Lecture 2 Number Systems.
Bits and Bytes 4/2/2008 Topics Physics, transistors, Moore’s law Why bits? Representing information as bits Binary/Hexadecimal Byte representations »numbers.
Bits and Bytes CS 213 Aug. 27, 1998 Topics Why bits? Representing information as bits –Binary/Hexadecimal –Byte representations »numbers »characters and.
Bits and Bytes January 17, 2002 Topics Why bits? Representing information as bits –Binary/Hexadecimal –Byte representations »numbers »characters and strings.
Bits and Bytes Topics Physics, transistors, Moore’s law Why bits? Representing information as bits Binary/Hexadecimal Byte representations »numbers »characters.
Bits and Bytes Topics Why bits? Representing information as bits Binary/Hexadecimal Byte representations »numbers »characters and strings »Instructions.
Number Systems and Arithmetic
 Binary Binary  Binary Number System Binary Number System  Binary to Decimal Binary to Decimal  Decimal to Binary Decimal to Binary  Octal and Hexadecimal.
Fabián E. Bustamante, Spring 2007 Bits and Bytes Today Why bits? Binary/hexadecimal Byte representations Boolean algebra Expressing in C.
Codes and number systems Introduction to Computer Yung-Yu Chuang with slides by Nisan & Schocken ( ) and Harris & Harris (DDCA)
Digital Logic Chapter 2 Number Conversions Digital Systems by Tocci.
Binary Arithmetic & Data representation
Chapter 4 The Components of the System Unit. Today The System Unit Motherboard CPU Control Unit ALU Machine Cycle System Clock Data Representation Memory.
ECEN2102 Digital Logic Design Lecture 1 Numbers Systems Abdullah Said Alkalbani University of Buraimi.
Number Systems What is the Standard Base we
CS 270: Computer Organization Bits, Bytes, and Integers
Bits and Bytes Spring, 2015 Topics Why bits? Representing information as bits Binary / Hexadecimal Byte representations »Numbers »Characters and strings.
Bits and Bytes Topics Representing information as bits Bit-level manipulations Boolean algebra Expressing in C.
Number systems, Operations, and Codes
Chapter1: Number Systems
Chapter 19 Number Systems. Irvine, Kip R. Assembly Language for Intel-Based Computers, Translating Languages English: Display the sum of A times.
Bits, Bytes, and Integers Topics Representing information as bits Bit-level manipulations Boolean algebra Expressing in C Representations of Integers Basic.
– 1 – Number Systems Number of symbols = base of the system Most intuitive -- base 10 (decimal system) counting on fingertips symbols
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.
Octal to Decimal Hexadecimal DecimalOctal Binary.
Positional Number Systems Decimal, Binary, Octal and Hexadecimal Numbers Wakerly Section
Lecture 1: 8/27/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Data Representation (in computer system). Data Representation How do computers represent data? b The computers are digital Recognize.
Info stored in computer (memory) Numbers All in binaray – can be converted to octal, hex Characters ASCII – 1-byte/char Unicode – 2-byte/char Unicode-table.com/en.
CEC 220 Digital Circuit Design Number Systems & Conversions Friday, January 9 CEC 220 Digital Circuit Design Slide 1 of 16.
Computer Number System
Bits and Bytes Topics Why bits? Representing information as bits
Number System Base b Use only digits of 0, 1, 2,…., b-1 Positional weights X = a n-1 b n-1 + a n-2 b n-2 + …. + a 0 b = 1x x10 1 +
CEC 220 Digital Circuit Design Number Systems & Conversions Wednesday, Aug 26 CEC 220 Digital Circuit Design Slide 1 of 16.
CSC 3210 Computer Organization and Programming
Lecture 2: Representing Numbers CS 2011 Fall 2014, Dr. Rozier.
Cis303a_chapt03_exam1_answer.ppt CIS303A: System Architecture Exam 1: Chapter 3 Answer List the characters (digits) for the following bases. 1) Decimal:
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.
Number Systems and Representations Binary Representation Binary Representation Signed numbers Signed numbers Very small and very big numbers Very small.
Computer Science 210 Computer Organization
Positional Number Systems Decimal, Binary, Octal and Hexadecimal Numbers Wakerly Section
Octal to Decimal Decimal Octal Binary Hexadecimal.
Assembly Language (CSW 353)
CSCI 198: Lecture 4: Data Representation
Integer Real Numbers Character Boolean Memory Address CPU Data Types
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
CSCI 161: Lecture 4: Data Representation
EPSII 59:006 Spring 2004.
CSE 102 Introduction to Computer Engineering
Chapter 3 Data Representation
University of Gujrat Department of Computer Science
BEE1244 Digital System and Electronics BEE1244 Digital System and Electronic Chapter 2 Number Systems.
Bits and Bytes Topics Representing information as bits
Comp Org & Assembly Lang
Bits and Bytes Topics Representing information as bits
Computer Science 210 Computer Organization
Bits and Bytes Topics Representing information as bits
Bits and Bytes Topics Representing information as bits
“The Class That Gives CMU Its Zip!”
Digital Electronics and Microprocessors
Bits and Bytes Topics Representing information as bits
Chapter Four Data Representation in Computers By Bezawit E.
Comp Org & Assembly Lang
“The Class That Gives CMU Its Zip!”
Computer Evolution and Performance
“The Class That Gives CMU Its Zip!”
Presentation transcript:

Number Systems 2.1 Information Storage Why not decimal numbers in computers ? Difficult to store ENIAC (1 st electronic computer) used 10 vacuum tubes Difficult to transmit Messy for digital logic functions Addition, multiplication, etc.

Binary Representations Electronic Implementation – Easy to store with bistable elements – Reliably transmitted on noisy and inaccurate wires – Straightforward implementation of arithmetic functions 0.0V 0.5V 2.8V 3.3V 010

Binary to Decimal Multiply positional weights by digits and add – – – Resulting decimal number represents the value

Decimal to Binary Decimal number D to base-2 number X – Continue dividing D by 2 – Take the last quotient and all remainder – >

Other Number System ? base 12 base 16 base 60 ? –

Bases 2, 8, 16, etc. 3 binary bits into a single octal 4 binary bits into a single hex E X Use characters ‘0’ to ‘9’ and ‘A’ to ‘F’ Write FA1D37B 16 in C as 0xFA1D37B – Or 0xfa1d37b A B C D E F Hex Decimal Binary

Letters ? ASCII byte/symbol Unicode 2 bytes/symbol g/charts/ A B C D E F G H I AJ BK CL DM EN FO P Q R S T U V W X Y AZ

Machine Words Machine Has “Word Size” – Nominal size of integer-valued data Including addresses – Most current machines are 32 bits (4 bytes) Limits addresses to 4GB Becoming too small for memory-intensive applications – High-end systems are 64 bits (8 bytes) Potentially address  1.8 X bytes – Machines support multiple data formats Fractions or multiples of word size Always integral number of bytes

Word-Oriented Memory Org bit Words BytesAddr bit Words Addr = ?? Addr = ?? Addr = ?? Addr = ?? Addr = ?? Addr = ?? Addresses Specify Byte Locations – Address of first byte in word – Addresses of successive words differ by 4 (32-bit) or 8 (64-bit)