Memory is implemented as an array of electronic switches



Similar documents
ASCII Code. Numerous codes were invented, including Émile Baudot's code (known as Baudot

plc numbers Encoded values; BCD and ASCII Error detection; parity, gray code and checksums

Numeral Systems. The number twenty-five can be represented in many ways: Decimal system (base 10): 25 Roman numerals:

Chapter 5. Binary, octal and hexadecimal numbers

BAR CODE 39 ELFRING FONTS INC.

Xi2000 Series Configuration Guide

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

Chapter 1. Binary, octal and hexadecimal numbers

Voyager 9520/40 Voyager GS9590 Eclipse 5145

URL encoding uses hex code prefixed by %. Quoted Printable encoding uses hex code prefixed by =.

Base Conversion written by Cathy Saxton

BI-300. Barcode configuration and commands Manual

BARCODE READER V 2.1 EN USER MANUAL

Symbols in subject lines. An in-depth look at symbols

DEBT COLLECTION SYSTEM ACCOUNT SUBMISSION FILE

The ASCII Character Set

Counting in base 10, 2 and 16

Representação de Caracteres

CHAPTER 8 BAR CODE CONTROL

Create!form Barcodes. User Guide

Command Emulator STAR Line Mode Command Specifications

TELOCATOR ALPHANUMERIC PROTOCOL (TAP)

Model 200 / 250 / 260 Programming Guide

INTERNATIONAL STANDARD

DL910 SERIES. Instruction Manual

Chapter 1: Digital Systems and Binary Numbers

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

This is great when speed is important and relatively few words are necessary, but Max would be a terrible language for writing a text editor.

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance

Digital Logic Design. Introduction

Barcode Magstripe. Decoder & Scanner. Programming Manual

ESPA Nov 1984 PROPOSAL FOR SERIAL DATA INTERFACE FOR PAGING EQUIPMENT CONTENTS 1. INTRODUCTION 2. CHARACTER DESCRIPTION

Section 1.4 Place Value Systems of Numeration in Other Bases

To convert an arbitrary power of 2 into its English equivalent, remember the rules of exponential arithmetic:

7-Bit coded Character Set

Binary, Hexadecimal, Octal, and BCD Numbers

Chapter 4 System Unit Components. Discovering Computers Your Interactive Guide to the Digital World

ASCII CODES WITH GREEK CHARACTERS

Security Protection of Software Programs by Information Sharing and Authentication Techniques Using Invisible ASCII Control Codes

Chapter 2: Basics on computers and digital information coding. A.A Information Technology and Arts Organizations

Discovering Computers Living in a Digital World

Main Memory & Backing Store. Main memory backing storage devices

The science of computing

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

Teletypewriter Communication Codes

Binary Representation

2 Number Systems. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to:

ASCII Characters. 146 CHAPTER 3 Information Representation. The sign bit is 1, so the number is negative. Converting to decimal gives

Chapter 8 Memory Units

Goals. Unary Numbers. Decimal Numbers. 3,148 is s 100 s 10 s 1 s. Number Bases 1/12/2009. COMP370 Intro to Computer Architecture 1

Barcode Scanning Made Easy. WWS500 Programming Guide

Characters & Strings Lesson 1 Outline

The Hexadecimal Number System and Memory Addressing

CSI 333 Lecture 1 Number Systems

Binary Representation. Number Systems. Base 10, Base 2, Base 16. Positional Notation. Conversion of Any Base to Decimal.

Scanner Configuration

Part No. : MUL PROGRAMMING GUIDE

Barcode Scanning Made Easy. Programming Guide

2011, The McGraw-Hill Companies, Inc. Chapter 3

Talk Encoding Issues. An overview to understand and be able to handle encoding issues in a better way. Susanne Ebrecht

S302D. Programming Guide. 2D Imaging Barcode Scanner. Advanced Handheld High-Speed Laser Scanner

NUMBER SYSTEMS. William Stallings

Logical Operations. Control Unit. Contents. Arithmetic Operations. Objectives. The Central Processing Unit: Arithmetic / Logic Unit.

AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping

Useful Number Systems

MK-SERIE 1000/1500/2000 AllOfBarcode.de Michael Krug Traunstein BARCODE SCANNER

Systems I: Computer Organization and Architecture

MK D Imager Barcode Scanner Configuration Guide

IBM Emulation Mode Printer Commands

M68HC05 Family. Understanding Small Microcontrollers. Freescale Semiconductor, I. For More Information On This Product, Go to:

EXERCISE 3: String Variables and ASCII Code

MINIMAG. Magnetic Stripe Reader Keyboard Wedge. User s Manual

ESC/POS Command Specifications

Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Cyber Security Workshop Encryption Reference Manual

Index...1. Introduction...3. Installation- Keyboard Wedge...3 RS USB...3. Default Setting for each barcode shown as below:...

Number Conversions Dr. Sarita Agarwal (Acharya Narendra Dev College,University of Delhi)

Applied Data Communication Lecture 14

CS101 Lecture 11: Number Systems and Binary Numbers. Aaron Stevens 14 February 2011

Computer Science 281 Binary and Hexadecimal Review

C Examples! Jennifer Rexford!

Chapter 4: Computer Codes

Data Storage. 1s and 0s

PRINTED MANUAL AGG Software (

Levent EREN A-306 Office Phone: INTRODUCTION TO DIGITAL LOGIC


Technical Support Bulletin Nr.18 Modbus Tips

ASCII control characters (character code 0-31)

Enter/Exit programming

MIPS Assembly Language Programming CS50 Discussion and Project Book. Daniel J. Ellard

BRMO 80 / ETH-IP. User Manual. Réf : MU-BRMO 80-ETH-IP-1.4-EN

Bar Code CCD Scanner OPERATION MANUAL

Positional Numbering System

Outline. hardware components programming environments. installing Python executing Python code. decimal and binary notations running Sage

LSN 2 Number Systems. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

Slide Set 8. for ENCM 369 Winter 2015 Lecture Section 01. Steve Norman, PhD, PEng

Barcode reader setup manual

How To Use A Microsoft Powerbook With A Microtron 2 (Ios) On A Microsatellite (Ipl) On An Iphone Or Ipro (Iphones) On Your Computer Or Ipo (Iphone)

CSCA0102 IT & Business Applications. Foundation in Business Information Technology School of Engineering & Computing Sciences FTMS College Global

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8

Transcription:

Memory Structure Memory is implemented as an array of electronic switches Each switch can be in one of two states 0 or 1, on or off, true or false, purple or gold, sitting or standing BInary digits (bits) are the fundamental unit of data storage in a computer Accessing each bit individually isn t very useful We want to store data that can take a wider range of values o the value 214 o the letter b o 1

Memory Structure By grouping bits together we can store more values 8 bits = 1 byte 16 bits = 2 bytes = 1 halfword 32 bits = 4 bytes = 1 word When we refer to memory locations by address (using the ARM7), we can only do so in units of bytes, halfwords or words the byte at address 21000 the halfword at address 21000 the word at address 21000 20998 20999 21000 21001 21002 21003 21004 21005 21006 21007 21008 21009 21010 21011 21012 21013 21014 8 bits 1 byte 97 23 49 252 0 4 85 240 49 252 0 8 85 251 78 64 44 Memory 2

Larger Units of Information Storage Larger units of information storage 1 kilobyte (kb) = 2 10 bytes = 1,024 bytes 1 megabyte (MB) = 1,024 KB = 2 20 bytes = 1,048,576 bytes 1 gigabyte (GB) = 1,024 MB = 2 30 bytes =... The following units of groups of bits are also used, usually when expressing data rates: 1 kilobit (kb) = 1,000 bits 1 megabit (Mb) = 1,000 kilobits = 1,000,000 bits IEC prefixes, KiB, MiB, GiB,... 3

Numeral Systems We use the decimal (base-10) numeral system most frequently We have symbols (digits) that can represent ten integer values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 We represent integer values larger than 9 with combinations of two or more digits, e.g.: 10, 11, 12,..., 112,..., 247 e.g.: 247 o = (7 x 10 0 ) + (4 x 10 1 ) + (2 x 10 2 ) o 2 is the Most Significant Digit o 7 is the Least Significant Digit Given n decimal digits, how many different integer values can we represent? o [0... (10 n - 1)] o e.g., n = 3 allows us to represent values in the range [0... 999] 4

Binary Numeral System (Base-2) Computer systems store information electronically using bits (binary digits) Each bit can be in one of two states, which we can take to represent the binary (base-2) digits 0 and 1 The binary number system is a natural number system for computing (rather than the decimal system) Using a single bit, we can represent integer values 0 and 1 Using two bits, we can represent 0, 1, 10, 11 o i.e. four different values How many unique values can we represent with, for example, eight bits? o [0... 11111111] in binary notation o [0... (2 8-1)] = [0... 255] in decimal notation o 256 unique values 5

Base Subscript Notation There are 102 types of people in the world: those who understand binary and those who don t... The same sequence of symbols can have a different meaning depending on the base being used We can use the subscript notation to make it clear which base we are using 12 10 = 1100 2 1 10 = 1 2 Using binary all the time would become quite tedious The 3D1 exam is worth 1010000 2 % of the final mark 6

Binary to Decimal Conversion Convert %100101 to its decimal equivalent 100101 = (1 x 2 0 ) + (0 x 2 1 ) + (1 x 2 2 ) + (0 x 2 3 ) + (0 x 2 4 ) + (1 x 2 5 ) + = 37 7

Decimal to Binary Conversion Convert 37 to its binary equivalent? Quotient Remainder Binary digit 37 / 2 = 18 1 1 18 / 2 = 9 0 0 9 / 2 = 4 1 1 4 / 2 = 2 0 0 2 / 2 = 1 0 0 1 / 2 = 0 1 1 8

Hexadecimal Numeral System (Base 16) Base-16 (hexadecimal) is a more convenient number system for computer scientists: With binary, we needed 2 symbols (0 and 1) With decimal, we needed 10 symbols (0, 1,..., 9) With hexadecimal, we need 16 symbols Use the same ten symbols as the decimal system for the first ten hexadecimal digits Borrow the first six symbols from the alphabet for the last six symbols, 0, 1,, 2,, 3,, 4, 5,, 6,, 7,, 8, 9,, A,, B,, C, D,, E,, F,,, Why is hexadecimal useful? 16 is a power of 2 (2 4 ), so exactly one hex digit can represent the same sixteen possible values as four bits 9

Decimal, Binary and Hexadecimal base-10 base-2 base-16 0 0000 0 1 0001 1 2 0010 2 3 0011 3 4 0100 4 5 0101 5 6 0110 6 7 0111 7 8 1000 8 9 1001 9 10 1010 A 11 1011 B 12 1100 C 13 1101 D 14 1110 E 15 1111 F 10

Converting Between Binary and Hex One hexadecimal digit represents the same number of values as four binary digits conversion between hex and binary is trivial the hexadecimal notation a convenient one for us 0 0 1 0 0 1 0 1 1 0 1 0 0 1 1 1 2 5 or 0x25 A 7 or 0xA7 Hexadecimal is used by convention when referring to memory addresses: e.g. address 0x1000, address 0x4002 0x denotes a hexadecimal value 11

Alternative Base Notation Without a fancy word processor, we won t be able to use the subscript notation to represent different bases How would we tell a computer whether we mean 10 or 10? Instead we can prefix values with symbols that provide additional information about the base In ARM assembly language (which we will be using) we use the following notation: 1000 No prefix usually means decimal 0x1000 Hexadecimal, used frequently &1000 2_1000 Binary n_1000 Base n Alternative hexadecimal notation 12

Representing Text So far, we have only considered how computers store integer values using binary digits What about representing other information, for example text composed of alphanumeric symbols? T, h, e,, q, u, i, c, k,, b, r, o, w, n,, f, o, x,... We re still restricted to storing binary digits (bits) in memory To store alphanumeric symbols or characters, we can assign each character a value which can be stored in binary form in memory 13

ASCII American Standard Code for Information Interchange ASCII is a standard used to encode alphanumeric and other characters associated with text e.g. representing the word hello using ASCII H E L L O $48 $45 $4C $4C $4F Each character is stored in a single byte value (8 bits) 1 byte = 8 bits means we can have a possible 256 characters In fact, ASCII only uses 7 bits, giving 128 possible characters Only 96 of the ASCII characters are printable Remaining values are control codes examples?? 14

ASCII 0 1 2 3 4 5 6 7 0 NUL DLE SPACE 0 @ P ` p 1 SOH DC1! 1 A Q a q 2 STX DC2 2 B R b r 3 ETX DC3 # 3 C S c s 4 EOT DC4 $ 4 D T d t 5 ENQ NAK % 5 E U e u 6 ACK SYN & 6 F V f v 7 BEL ETB 7 G W g w 8 BS CAN ( 8 H X h x 9 HT EM ) 9 I Y i y A LF SUB * : J Z j z B VT ESC + ; K [ k { C FF FS, < L \ l D CR GS - = M ] m } E SO RS. > N ^ n ~ F SI US /? O _ o DEL 15

ASCII Some things to note about ASCII The value 0 is not the name as the character 0 Similarly, the value 1 is not the same as the character 1,... The characters 0, 1,... are used in text to display values in human readable form Upper and lower case characters have different codes The first printable character is the space symbol, and it has code 32 10 ASCII is a base-128 number system and each value has a different symbol It is more efficient to store a value in its value form than its text form (i.e. Store the value 10 10 instead of the ASCII symbols 1 followed by 0.) 16

Types of Memory Random Access Memory (RAM) The CPU can both read and modify the contents of memory Volatile (information lost when power is turned off) Non-volatile (information retained when power is turned off) Read Only Memory (ROM) CPU can only read the contents of memory Non-volatile Further classified by ability to change contents o Programmable ROM (PROM): Can only write contents once o Erasable Programmable ROM (EPROM): Can erase contents using ultra-violet light and re-write o Electronically Erasable Programmable ROM (EEPROM): Can erase contents electronically (including Flash Memory ) 17