Big-Endians Little-Endians and Bi-Endians

Slides:



Advertisements
Similar presentations
CH10 Instruction Sets: Characteristics and Functions
Advertisements

Chapter 3 Instruction Set Architecture Advanced Computer Architecture COE 501.
Programming with UDP – I Covered Subjects: IPv4 Socket Address Structure Byte Ordering Functions Address Access/Conversion Functions Functions: 1.socket()
Chapter 2 Microprocessor Bus Transfers. Big- and Little-Endian Ordering Bit-endian processor architecture –High-order-byte-first (H-O-B-F) map the highest-order.
COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) Lecturer: Hui Wu Session.
ARM programmer’s model and assembler Embedded Systems Programming.
Implementation of a Stored Program Computer
ECE 4436ECE 5367 ISA I. ECE 4436ECE 5367 CPU = Seconds= Instructions x Cycles x Seconds Time Program Program Instruction Cycle CPU = Seconds= Instructions.
Data Representation Prepared by Dr P Marais (Modified by D Burford)
Instruction Set Architecture
ZONG Wen Department of Computer Science and Engineering The Chinese University of Hong Kong
L/O/G/O The Instruction Set Chapter 9 CS.216 Computer Architecture and Organization.
Implementation of a Stored Program Computer ITCS 3181 Logic and Computer Systems 2014 B. Wilkinson Slides2.ppt Modification date: Oct 16,
Variables and Objects, pointers and addresses: Chapter 3, Slide 1 variables and data objects are data containers with names the value of the variable is.
Machine-Level Programming 6 Structured Data Topics Structs Unions.
Instruction Set Architecture Nizamettin AYDIN
CS 270: Computer Organization Bits, Bytes, and Integers
C programming or Fun with pointers Tutorial #2 CPSC 261.
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.
COMPUTER ORGANIZATION & ARCHITECTURE A digital computer solves problems by executing a sequence of instructions called a program Ioan Despi.
Ithaca College 1 Machine-Level Programming VIII: Advanced Topics: alignment & Unions Comp 21000: Introduction to Computer Systems & Assembly Lang Systems.
(a) Parameter passing in a local procedure call: the stack before the call (b) The stack while the called procedure is active. count =
Bits and Bytes Topics Why bits? Tell me Representing information as bits Binary/Hexadecimal Byte representations »numbers »characters and strings »Instructions.
Lecture 8. MIPS Instructions #2 – Memory Access (Load/Store) Instructions Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer.
Lecture 4. MIPS Instructions #2 Memory Access (Load/Store) Instructions Prof. Taeweon Suh Computer Science Education Korea University ECM534 Advanced Computer.
Bits, Bytes, and Integers Topics Representing information as bits Bit-level manipulations Boolean algebra Expressing in C Representations of Integers Basic.
Byte Order Mohammad Kamal. Byte order Problem with byte order Numbers vs Data Practical example for reading data Exchanging Data between different systems.
Computer Foundations Dr. John P. Abraham Professor UTPA.
Computer Architecture EKT 422
Differences in ISA Instruction length
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.
Chapter 10 Instruction Sets: Characteristics and Functions Felipe Navarro Luis Gomez Collin Brown.
DR. SIMING LIU SPRING 2016 COMPUTER SCIENCE AND ENGINEERING UNIVERSITY OF NEVADA, RENO Session 7, 8 Instruction Set Architecture.
1 ECE243 ISA: Instruction Set Architecture. 2 A TYPICAL PC Motherboard (CPU, MEMORY) Hard drive CD/DVD R/W USB Connectors Graphics card Monitor Keyboard.
Instruction Sets: Characteristics and Functions  Software and Hardware interface Machine Instruction Characteristics Types of Operands Types of Operations.
Address alignment When a word (4-bytes) is loaded or stored the memory address must be a multiple of four. This is called an alignment restriction. Addresses.
Lecture 2: Representing Numbers CS 2011 Fall 2014, Dr. Rozier.
Memory, Bits, & Bytes. Memory Part of the computer where programs and data are stored. Read and written (changed). Bit – Binary digit – Basic unit of.
Number Systems and Representations Binary Representation Binary Representation Signed numbers Signed numbers Very small and very big numbers Very small.
Lecture 12: 10/3/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Computer Architecture & Operations I
Computer Architecture & Operations I
Recitation 4&5 and review 1 & 2 & 3
An example of multiplying two numbers A = A * B;
Machine-Level Programming 6 Structured Data
Bits and Bytes Topics Representing information as bits
Comp Org & Assembly Lang
Bits and Bytes Topics Representing information as bits
ECE 353 Introduction to Microprocessor Systems
Bits and Bytes Topics Representing information as bits
Little Endian vs. Big Endian (Intel vs. Motorola)
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)
ECEG-3202 Computer Architecture and Organization
Bits and Bytes Topics Representing information as bits
Chapter 9 Instruction Sets: Characteristics and Functions
A Closer Look at Instruction Set Architectures Chapter 5
ECEG-3202 Computer Architecture and Organization
Chapter 9 Instruction Sets: Characteristics and Functions
What is Computer Architecture?
Comp Org & Assembly Lang
What is Computer Architecture?
What is Computer Architecture?
Variables and Computer Memory
Review In last lecture, done with unsigned and signed number representation. Introduced how to represent real numbers in float format.
CSE378 Introduction to Machine Organization
Presentation transcript:

Big-Endians Little-Endians and Bi-Endians Unfortunately there is not a universal standard for how the bytes in a word are stored in computer memory or how the bits are ordered in each byte. Byte Ordering - Suppose we are to store the 32-bit hexadecimal word AB1032FE into a byte addressable memory. Address Value Address Value 184 AB 185 10 186 32 187 FE 184 FE 185 32 186 10 187 AB This mapping is called big-endian since it stores the word with its most significant byte in the lowest address This mapping is called little-endian since it stores the word with its least significant byte in the lowest address

Big-Endian Address Map Byte Addr Little-Endian Address Map For byte-addressing the order is immaterial. An issue arises when we want to reference a multibyte word with a single address. The Intel 80x86, Pentium II, VAX and Alpha are little-endian machines. Other such as the IBM 370/390, the Motorola 680x0, and Sun SPARC are big-endian systems. The PowerPC allows both modes and is said to be bi-endian. struct{ int a; //0x1112_1314 int pad; // double b; //0x2122_2324_2526_2728 char* c; //0x3132_3334 char d[7]; //'A','B','C','D','E','F','G' short e; //0x5152 int f; //0x6161_6364 } s; 11 12 13 14 21 22 23 24 25 26 27 28 31 32 33 34 A B C D E F G 51 52 61 62 63 64 00 08 10 18 20 Byte Addr Big-Endian Address Map 00 08 10 18 20 14 13 12 11 28 27 26 25 24 23 22 21 34 33 32 31 A B C D E F G 52 51 64 63 62 61 Byte Addr Little-Endian Address Map