Little Endian vs. Big Endian (Intel vs. Motorola)

Slides:



Advertisements
Similar presentations
Cache Memory Exercises. Questions I Given: –memory is little-endian and byte addressable; memory size; –number of cache blocks, size of cache block –An.
Advertisements

MD5 Generation Auto-Generated Slides To Visualize MD5 Hash Generation by Chris Fremgen.
COMP 2130 Intro Computer Systems Thompson Rivers University
1 Harvard University CSCI E-2a Life, Liberty, and Happiness After the Digital Explosion 3B: Representation.
Introduction to Computing CPSC 203 January 24, 2006 Heejin Lim Chapter 1 Chapter 2 (part of)
1 Instructions and Addressing
Refer to Ivor Horton’s Beginning ANSI C++ The Complete Language, 3rd Ed. APress Media, LLC. Basic Data Type and calculations Data types in C++ Program.
Communications Technology 2104 Mercedes Lahey. Bit 1. bit=From a shortening of the words “binary digit” 2. the basic unit of information for computers.
Lecture 1. Number Systems Prof. Taeweon Suh Computer Science Education Korea University ECM585 Special Topics in Computer Design.
Data Representation Prepared by Dr P Marais (Modified by D Burford)
Data Representation A series of eight bits is called a byte. A byte can be used to represent a number or a character. As you’ll see in the following table,
Number Systems. Today Decimal Hexadecimal Binary –Unsigned Binary –1’s Complement Binary –2’s Complement Binary.
OBJECTIVES  Explain why a computer represents data in the form of binary  Explain the terms related to data storage: bit, byte, character, word  Calculate.
CS 270: Computer Organization Bits, Bytes, and Integers
COMPUTER SCIENCE Data Representation and Machine Concepts Section 1.2 Instructor: Lin Chen August 2013.
Getting to know Storage Media 1.Stores information 2.Retrieve information for later use.
Computer Systems Nat 4/5 Computing Science Data Representation Lesson 2: Floating Point Representation.
1 3 Computing System Fundamentals 3.2 Computer Architecture.
Units of Storage 1.5 Types of Memory and Storage.
How Memory Works Physical Example 0 Water Tank 1 EmptyFull.
Byte Order Mohammad Kamal. Byte order Problem with byte order Numbers vs Data Practical example for reading data Exchanging Data between different systems.
Big Endian vs. Little Endian Storage of Numeric Data Noah Mendelsohn Tufts University Web:
Networking for Home and Small Businesses –.  Explain the binary representation of data.
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.
Computer Math CPS120: Binary Representations. Binary computers have storage units called binary digits or bits: Low Voltage = 0 High Voltage = 1 all bits.
Data Types Always data types will decide which type of information we are storing into variables In C programming language we are having 3 types of basic.
EECS 370 Discussion 1 xkcd.com. EECS 370 Discussion Topics Today: – ARM Addressing Endianness, Loading, and Storing Data – Data Layout Struct Packing.
CHARLES UNIVERSITY IN PRAGUE faculty of mathematics and physics Principles of Computers 11 th Lecture Pavel Ježek, Ph.D.
Computer Performance. Hard Drive - HDD Stores your files, programs, and information. If it gets full, you can’t save any more. Measured in bytes (KB,
Binary IO Writing and Reading Raw Data. Files Two major flavors of file: Text Binary.
Number Systems and Representations Binary Representation Binary Representation Signed numbers Signed numbers Very small and very big numbers Very small.
Binary Numbers. Base 10 and Base 2  We normally work with numbers in base 10.  In base 10 we use the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.  Everything.
1 Instructions and Addressing Course website:
Integer VariablestMyn1 Integer Variables It must be possible to store data items in a program, and this facility is provided by variables. A variable is.
Variables Bryce Boe 2012/09/05 CS32, Summer 2012 B.
Numerical Representation Intro to Computer Science CS1510 Dr. Sarah Diesburg 1.
Prof. Hsien-Hsin Sean Lee
Big-Endians Little-Endians and Bi-Endians
How Computers Store Variables
Recitation 4&5 and review 1 & 2 & 3
CPEG323 Quiz 1 Review Long Chen October, 26th, 2005.
Numerical Representation
Memory Parts of a computer
COMP211 Computer Logic Design Lecture 1. Number Systems
EPSII 59:006 Spring 2004.
Data Types The type states how much and what kind of data the variable can store. integers- whole numbers no fractional parts int, short, long floating.
Unit 2.6 Data Representation Lesson 1 ‒ Numbers
Binary numbers and arithmetic
इंट्रस्टिंग बनने के लिए आपको इंट्रस्टेड होना पड़ेगा।
Principles of Computers 16th Lecture
ENGR 3410 – Computer Architecture Mark L. Chang Fall 2006
Instruction Set Architectures
How do computers work? Storage.
Numerical Representation
CS 585 Summer 2002 By Robert Moncrief II
Bits and Bytes Topics Representing information as bits
Comp Org & Assembly Lang
Bits and Bytes Topics Representing information as bits
Bits and Bytes Topics Representing information as bits
Chương 3: Tổ chức thông tin
Bits and Bytes Topics Representing information as bits
Storing Information Each memory cell stores a set number of bits (usually 8 bits, or one byte) (byte addressable)
Numerical Representation
Comp Org & Assembly Lang
Comp Org & Assembly Lang
Comp Org & Assembly Lang
Computer Systems Nat 4/5 Computing Science Data Representation
Principles of Computers 14th Lecture
Principles of Computers 15th Lecture
Numerical Representation
Presentation transcript:

Little Endian vs. Big Endian (Intel vs. Motorola)

LITTLE ENDIAN vs. BIG ENDIAN Let consider the following declarations in C: unsigned char r1[ ]={1,2,3,4,5,6,7,8,9,10,100,101,102,103,255} unsigned short r2[ ]={1,2,3,4,5,100,65533,65534,65535} unsigned int r3[ ]={1,2,3,100,255,4096,12500000}

MOTOROLA Address 0AB012 0102 0304 0506 0708 090A 6465 6667 FF00 0AB022   0AB012 0102 0304 0506 0708 090A 6465 6667 FF00 0AB022 0001 0002 0003 0004 0005 0064 FFFD FFFE 0AB032 FFFF 0000 0AB042 00FF 1000 00BE BC20 0AB052 0AB062 r1[0] r2[0] r3[0] r3[6]

INTEL Address   0012012 0102 0304 0506 0708 090A 6465 6667 FF00 0012022 0100 0200 0300 0400 0500 6400 FDFF FEFF 0012032 FFFF 0000 0012042 0010 20BC BE00 0012052 00FF 0012062 0064 r3[6] r3[0] r1[0] r2[0]

Representation example for numbers on 64 bits a) Memory representation for Motorola b) Memory representation for Intel

Memory – storage capacity Memory width Memory address width (16, 20, 24, 32,40 bits) Memory address on 16 bits => 216 memory locations (64KB of memory) Memory address on 20 bits => 220 memory locations (1MB of memory) Memory address on 24 bits => 224 memory locations (16MB of memory) Memory address on 32 bits => 232 memory locations (4GB of memory) Memory address on 40 bits => 240 memory locations (1TB of memory) Memory address on 64 bits => 264 memory locations (16Exabytes of memory: 18,446,744,073,709,551,616 bytes!) Memory address