CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 02, FALL 2012
|
|
- Noah Oliver
- 5 years ago
- Views:
Transcription
1 CMSC 33 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 2, FALL 22
2 TOPICS TODAY Bits of Memory Data formats for negative numbers Modulo arithmetic & two s complement Floating point formats (briefly) Characters & strings
3 BITS OF MEMORY
4 Random Access Memory (RAM) A single byte of memory holds 8 binary digits (bits). Each byte of memory has its own address. A 32-bit CPU can address 4 gigabytes of memory, but a machine may have much less (e.g., 256MB). For now, think of RAM as one big array of bytes. The data stored in a byte of memory is not typed. The assembly language programmer must remember whether the data stored in a byte is a character, an unsigned number, a signed number, part of a multi-byte number,... UMBC, CMSC33, Richard Chang <chang@umbc.edu>
5 4-5 Chapter 4: The Instruction Set Architecture Common Sizes for Data Types A byte is composed of 8 bits. Two nibbles make up a byte. Halfwords, words, doublewords, and quadwords are composed of bytes as shown below: Bit Nibble Byte 6-bit word (halfword) 32-bit word 64-bit word (double) 28-bit word (quad) Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring
6 4-6 Chapter 4: The Instruction Set Architecture Big-Endian and Little-Endian Formats In a byte-addressable machine, the smallest datum that can be referenced in memory is the byte. Multi-byte words are stored as a sequence of bytes, in which the address of the multi-byte word is the same as the byte of the word that has the lowest address. When multi-byte words are used, two choices for the order in which the bytes are stored in memory are: most significant byte at lowest address, referred to as big-endian, or least significant byte stored at lowest address, referred to as little-endian. Byte 3 Big-Endian 3 Little-Endian MSB LSB MSB LSB x x+ x+2 x+3 x+3 x+2 x+ x Word address is x for both big-endian and little-endian formats. Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring
7 NEGATIVE NUMBERS
8 2- Chapter 2: Data Representation Signed Fixed Point Numbers For an 8-bit number, there are 2 8 = 256 possible bit patterns. These bit patterns can represent negative numbers if we choose to assign bit patterns to numbers in this way. We can assign half of the bit patterns to negative numbers and half of the bit patterns to positive numbers. Four signed representations we will cover are: Signed Magnitude One s Complement Two s Complement Excess (Biased) Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring
9 2-2 Chapter 2: Data Representation Signed Magnitude Also know as sign and magnitude, the leftmost bit is the sign ( = positive, = negative) and the remaining bits are the magnitude. Example: +25 = 2-25 = 2 Two representations for zero: + = 2, - = 2. Largest number is +27, smallest number is -27, using an 8-bit representation. Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring
10 2-3 Chapter 2: Data Representation One s Complement The leftmost bit is the sign ( = positive, = negative). Negative of a number is obtained by subtracting each bit from 2 (essentially, complementing each bit from to or from to ). This goes both ways: converting positive numbers to negative numbers, and converting negative numbers to positive numbers. Example: +25 = 2-25 = 2 Two representations for zero: + = 2, - = 2. Largest number is +27, smallest number is -27, using an 8- bit representation. Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring
11 2-4 Chapter 2: Data Representation Two s Complement The leftmost bit is the sign ( = positive, = negative). Negative of a number is obtained by adding to the one s complement negative. This goes both ways, converting between positive and negative numbers. Example (recall that -25 in one s complement is 2 ): +25 = 2-25 = 2 One representation for zero: + = 2, - = 2. Largest number is +27, smallest number is -28, using an 8- bit representation. Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring
12 2-5 Excess (Biased) Chapter 2: Data Representation The leftmost bit is the sign (usually = positive, = negative). Positive and negative representations of a number are obtained by adding a bias to the two s complement representation. This goes both ways, converting between positive and negative numbers. The effect is that numerically smaller numbers have smaller bit patterns, simplifying comparisons for floating point exponents. Example (excess 28 adds 28 to the two s complement version, ignoring any carry out of the most significant bit) : +2 = 2-2 = 2 One representation for zero: + = 2, - = 2. Largest number is +27, smallest number is -28, using an 8- bit representation. Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring
13 Signed Magnitude Example: Convert = = 2-23 => 2 One s Complement (flip the bits) -23 => 2 Two s Complement (add to one s complement) -23 => 2 Excess 28 (add 28 to two s complement) -23 => 2 UMBC, CMSC33, Richard Chang <chang@umbc.edu>
14 3-bit Signed Integer Representations Decimal Unsigned Sign Mag s Comp 2 s Comp Excess / / UMBC, CMSC33, Richard Chang <chang@umbc.edu>
15 2- Chapter 2: Data Representation Binary Addition This simple binary addition example provides background for the signed number representations to follow. Carry in Operands Carry out Sum Carry Addend: A Augend: B Sum + Example: (24) (9) (24) Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring
16 3-4 Number Circle for 3-Bit Two s Complement Numbers Chapter 3: Arithmetic Numbers can be added or subtracted by traversing the number circle clockwise for addition and counterclockwise for subtraction. Overflow occurs when a transition is made from +3 to -4 while proceeding around the number circle when adding, or from -4 to +3 while subtracting. - Subtracting numbers Adding numbers Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring
17 8-bit Two s Complement Addition 54 = = 6 = 44 = = -4 = -44 = = -92 = UMBC, CMSC33, Richard Chang <chang@umbc.edu>
18 Two s Complement Overflow An overflow occurs if adding two positive numbers yields a negative result or if adding two negative numbers yields a positive result. Adding a positive and a negative number never causes an overflow. Carry out of the most significant bit does not indicate an overflow. An overflow occurs when the carry into the most significant bit differs from the carry out of the most significant bit. UMBC, CMSC33, Richard Chang <chang@umbc.edu>
19 Two s Complement Overflow Examples 54 = + 8 = 62-3 = = -5 UMBC, CMSC33, Richard Chang <chang@umbc.edu>
20 Two s Complement Sign Extension Decimal 8-bit 6-bit +5-5 Why does sign extension work? -x is represented as x in 8-bit -x is represented as x in 6-bit x +??? = x??? = = = 256 = 6528 UMBC, CMSC33, Richard Chang <chang@umbc.edu>
21 MODULO ARITHMETIC
22 Is Two s Complement Magic? Why does adding positive and negative numbers work? Why do we add to the one s complement to negate? Answer: Because modulo arithmetic works. UMBC, CMSC33, Richard Chang <chang@umbc.edu>
23 Modulo Arithmetic Definition: Let a and b be integers and let m be a positive integer. We say that a b (mod m) if the remainder of a divided by m is equal to the remanider of b divided by m. In the C programming language, a b (mod m) would be written a % m == b % m We use the theorem: If a b (mod m) and c d (mod m) then a + c b + d (mod m).
24 ATheoremofModuloArithmetic Thm: If a b (mod m) and c d (mod m) then a + c b + d (mod m). Example: Let m =8, a =3, b =27, c =2and d = (mod 8) and 2 8 (mod 8) (mod 8). Proof: Write a = q a m + r a, b = q b m + r b, c = q c m + r c and d = q d m + r d, where r a, r b, r c and r d are between and m. Then, a + c =(q a + q c )m + r a + r c b + d =(q b + q d )m + r b + r d =(q b + q d )m + r a + r c. Thus, a + c r a + r c b + d (mod m). 2
25 Consider Numbers Modulo = = = = = = = = = If 2 thru 2 represents thru 27 and 2 thru 2 represents -28 thru -, then the most significant bit can be used to determine the sign. 3
26 Some Answers In 8-bit two s complement, we use addition modulo 2 8 =256,soadding 256 or subtracting 256 is equivalent to adding or subtracting. To negate a number x, x 28: x = x 256 x =(255 x)+=( 2 x)+ Note that 2 x is the one s complement of x. Now we can just add positive and negative numbers. For example: 3+( 5) 3+(256 5) = = = 2. or two negative numbers (as long as there s no overflow): ( 3) + ( 5) (256 3) + (256 5) = = 8. 4
27 FLOATING POINT NUMBERS
28 IEEE bit Floating Point Format sign bit, 8-bit exponent, 23-bit mantissa normalized as.xxxxx leading is hidden 8-bit exponent in excess 27 format NOT excess 28 and are reserved + and - is zero exponent and zero mantissa exponent and zero mantissa is infinity UMBC, CMSC33, Richard Chang <chang@umbc.edu>
29 2-27 Chapter 2: Data Representation IEEE-754 Floating Point Formats 32 bits Single precision Sign ( bit) 8 bits 23 bits Exponent Fraction 64 bits Double precision bits 52 bits Exponent Fraction Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring
30 2-29 Chapter 2: Data Representation IEEE-754 Conversion Example Represent in single precision IEEE-754 format. Step #: Convert to target base = -. 2 Step #2: Normalize = Step #3: Fill in bit fields. Sign is negative, so sign bit is. Exponent is in excess 27 (not excess 28!), so exponent is represented as the unsigned integer = 3. Leading of significand is hidden, so final bit pattern is:. Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring
31 2-28 Chapter 2: Data Representation IEEE-754 Examples Value Bit Pattern (a) Sign Exponent Fraction (b) (c) (d) + (e) (f) + (g) (h) +NaN (i) Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring
32 CHARACTERS & STRINGS
33 2-3 Chapter 2: Data Representation ASCII Character Code ASCII is a 7-bit code, commonly stored in 8-bit bytes. A is at 4 6. To convert upper case letters to lower case letters, add 2 6. Thus a is at = 6 6. The character 5 at position 35 6 is different than the number 5. To convert character-numbers into number-numbers, subtract 3 6 : = 5. NUL SOH 2 STX 3 ETX 4 EOT 5 ENQ 6 ACK 7 BEL 8 BS 9 HT A LF B VT C FF D CR E SO F SI NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT DLE DC 2 DC2 3 DC3 4 DC4 5 NAK 6 SYN 7 ETB 8 CAN 9 EM A SUB B ESC C FS D GS E RS F US 2 SP 2! 22 " 23 # 24 $ 25 % 26 & 27 ' 28 ( 29 ) 2A * 2B + 2C 2D - 2E. 2F / Null Start of heading Start of text End of text End of transmission Enquiry Acknowledge Bell Backspace Horizontal tab Line feed Vertical tab FF CR SO SI DLE DC DC2 DC3 DC4 NAK SYN ETB A : 3B ; 3C < 3D = 3E > 3F? 4 A 42 B 43 C 44 D 45 E 46 F 47 G 48 H 49 I 4A J 4B K 4C L 4D M 4E N 4F O 5 P 5 Q 52 R 53 S 54 T 55 U 56 V 57 W 58 X 59 Y 5A Z 5B [ 5C \ 5D ] 5E ^ 5F _ Form feed Carriage return Shift out Shift in Data link escape Device control Device control 2 Device control 3 Device control 4 Negative acknowledge Synchronous idle End of transmission block 6 ` 6 a 62 b 63 c 64 d 65 e 66 f 67 g 68 h 69 i 6A j 6B k 6C l 6D m 6E n 6F o CAN EM SUB ESC FS GS RS US SP DEL 7 p 7 q 72 r 73 s 74 t 75 u 76 v 77 w 78 x 79 y 7A z 7B { 7C 7D } 7E ~ 7F DEL Cancel End of medium Substitute Escape File separator Group separator Record separator Unit separator Space Delete Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring
34 2-32 Chapter 2: Data Representation EBCDIC Character Code EBCDIC is an 8-bit code. STX Start of text RS Reader Stop DC Device Control BEL Bell DLE Data Link Escape PF Punch Off DC2 Device Control 2 SP Space BS Backspace DS Digit Select DC4 Device Control 4 IL Idle ACK Acknowledge PN Punch On CU Customer Use NUL Null SOH Start of Heading SM Set Mode CU2 Customer Use 2 ENQ Enquiry LC Lower Case CU3 Customer Use 3 ESC Escape CC Cursor Control SYN Synchronous Idle BYP Bypass CR Carriage Return IFS Interchange File Separator CAN Cancel EM End of Medium EOT End of Transmission RES Restore FF Form Feed ETB End of Transmission Block SI Shift In TM Tape Mark NAK Negative Acknowledge SO Shift Out UC Upper Case SMM Start of Manual Message DEL Delete FS Field Separator SOS Start of Significance SUB Substitute HT Horizontal Tab IGS Interchange Group Separator NL New Line VT Vertical Tab IRS Interchange Record Separator LF Line Feed UC Upper Case IUS Interchange Unit Separator NUL 2 DS 4 SP 6 8 A C { E \ SOH 2 SOS 4 6 / 8 a A ~ C A E 2 STX 22 FS b A2 s C2 B E2 S 3 ETX c A3 t C3 C E3 T 4 PF 24 BYP d A4 u C4 D E4 U 5 HT 25 LF e A5 v C5 E E5 V 6 LC 26 ETB f A6 w C6 F E6 W 7 DEL 27 ESC g A7 x C7 G E7 X h A8 y C8 H E8 Y i A9 z C9 I E9 Z A SMM 2A SM 4A 6A 8A AA CA EA B VT 2B CU2 4B 6B, 8B AB CB EB C FF 2C 4C < 6C % 8C AC CC EC D CR 2D ENQ 4D ( 6D _ 8D AD CD ED E SO 2E ACK 4E + 6E > 8E AE CE EE F SI 2F BEL 4F 6F? 8F AF CF EF DLE 3 5 & 7 9 B D } F DC j B D J F 2 DC2 32 SYN k B2 D2 K F2 2 3 TM l B3 D3 L F3 3 4 RES 34 PN m B4 D4 M F4 4 5 NL 35 RS n B5 D5 N F5 5 6 BS 36 UC o B6 D6 O F6 6 7 IL 37 EOT p B7 D7 P F7 7 8 CAN q B8 D8 Q F8 8 9 EM r B9 D9 R F9 9 A CC 3A 5A! 7A : 9A BA DA FA B CU 3B CU3 5B $ 7B # 9B BB DB FB C IFS 3C DC4 5C. 9C BC DC FC D IGS 3D NAK 5D ) 7D ' 9D BD DD FD E IRS 3E 5E ; 7E = 9E BE DE FE F IUS 3F SUB 5F 7F " 9F BF DF FF Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. Heuring
35 2-33 Unicode Character Code Unicode is a 6- bit code A B C D E F A B C D E F NUL 2 SOH 2 STX 22 ETX 23 EOT 24 ENQ 25 ACK 26 BEL 27 BS HT LF 2A VT 2B FF 2C CR 2D SO 2E SI 2F DLE 3 DC 3 DC2 32 DC3 33 DC4 34 NAK 35 SYN 36 ETB 37 CAN 38 EM 39 SUB ESC FS GS RS US 3A 3B 3C 3D 3E 3F SP! " # $ % & ' ( ) * + -. / : ; < = >? A 4B 4C 4D 4E 4F A 5B 5C 5D 5E 5F NUL Null SOH Start of heading CAN Cancel SP Space STX Start of text EOT End of transmission EM End of medium DEL Delete ETX End of text DC Device control SUB Substitute Control ENQ Enquiry DC2 Device control 2 ESC Escape FF Form feed ACK Acknowledge DC3 Device control 3 FS File separator CR Carriage return BEL Bell DC4 Device control 4 GS Group separator SO Shift out BS Backspace NAK Negative acknowledge RS Record separator SI Shift in HT Horizontal tab NBS Non-breaking space US Unit separator DLE Data link escape LF Line feed ETB End of transmission block SYN Synchronous idle VT Vertical tab Principles of Computer Architecture by M. Murdocca and V. Heuring 999 M. Murdocca and V. A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ A 6B 6C 6D 6E 6F A 7B 7C 7D 7E 7F ` a b c d e f g h i j k l m n o p q r s t u v w x y z { } ~ DEL A 8B 8C 8D 8E 8F A 9B 9C 9D 9E 9F P Chapter 2: Data Representation A NBS C À E à A C Á E á A2 C2 Â E2 â A3 C3 Ã E3 ã A4 C4 Ä E4 ä A5 C5 Å E5 å A6 & C6 Æ E6 æ A7 C7 Ç E7 ç A8 C8 È E8 è A9 C9 É E9 é AA a CA Ê EA ê AB «CB Ë EB ë AC CC Ì EC ì AD CD Í ED í AE CE Î EE î AF CF Ï EF ï B D D F B ± D Ñ F ñ B2 2 D2 Ò F2 ò B3 3 D3 Ó F3 ó B4 D4 Ô F4 ô B5 µ D5 Õ F5 õ B6 D6 Ö F6 ö B7 D7 F7 B8 Ç D8 Ø F8 ø B9 D9 Ù F9 ù BA o DA Ú FA ú BB» DB Û FB û BC /4 DC Ü FC ü BD /2 DD Y FD BE 3/4 DE y FE p BF DF FF ÿ
36 NEXT TIME Basic Intel i-386 architecture Hello World in Linux assembly Addressing modes
37 CMSC 44 ALGORITHMS WITH PROF. KALPAKIS MEETS IN ITE 233 (THIS ROOM IS ITE 229)
CMSC 313 Lecture 03 Multiple-byte data big-endian vs little-endian sign extension Multiplication and division Floating point formats Character Codes
Multiple-byte data CMSC 313 Lecture 03 big-endian vs little-endian sign extension Multiplication and division Floating point formats Character Codes UMBC, CMSC313, Richard Chang 4-5 Chapter
More informationCMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 02, SPRING 2013
CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 02, SPRING 2013 TOPICS TODAY Bits of Memory Data formats for negative numbers Modulo arithmetic & two s complement Floating point
More informationCMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 02, FALL 2012
CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 02, FALL 2012 ANNOUNCEMENTS TA Office Hours (ITE 334): Genaro Hernandez, Jr. Mon 10am 12noon Roshan Ghumare Wed 10am 12noon Prof.
More informationASCII Code - The extended ASCII table
ASCII Code - The extended ASCII table ASCII, stands for American Standard Code for Information Interchange. It's a 7-bit character code where every single bit represents a unique character. On this webpage
More informationOOstaExcel.ir. J. Abbasi Syooki. HTML Number. Device Control 1 (oft. XON) Device Control 3 (oft. Negative Acknowledgement
OOstaExcel.ir J. Abbasi Syooki HTML Name HTML Number دهدهی ا کتال هگزاد سیمال باینری نشانه )کاراکتر( توضیح Null char Start of Heading Start of Text End of Text End of Transmission Enquiry Acknowledgment
More informationDATA REPRESENTATION. Data Types. Complements. Fixed Point Representations. Floating Point Representations. Other Binary Codes. Error Detection Codes
1 DATA REPRESENTATION Data Types Complements Fixed Point Representations Floating Point Representations Other Binary Codes Error Detection Codes 2 Data Types DATA REPRESENTATION Information that a Computer
More information1.1. INTRODUCTION 1.2. NUMBER SYSTEMS
Chapter 1. 1.1. INTRODUCTION Digital computers have brought about the information age that we live in today. Computers are important tools because they can locate and process enormous amounts of information
More informationChapter 3. Information Representation
Chapter 3 Information Representation Instruction Set Architecture APPLICATION LEVEL HIGH-ORDER LANGUAGE LEVEL ASSEMBLY LEVEL OPERATING SYSTEM LEVEL INSTRUCTION SET ARCHITECTURE LEVEL 3 MICROCODE LEVEL
More informationChapter 2 Number System
Chapter 2 Number System Embedded Systems with ARM Cortext-M Updated: Tuesday, January 16, 2018 What you should know.. Before coming to this class Decimal Binary Octal Hex 0 0000 00 0x0 1 0001 01 0x1 2
More informationChemistry Hour Exam 2
Chemistry 838 - Hour Exam 2 Fall 2003 Department of Chemistry Michigan State University East Lansing, MI 48824 Name Student Number Question Points Score 1 15 2 15 3 15 4 15 5 15 6 15 7 15 8 15 9 15 Total
More informationChapter 2 Bits, Data Types, and Operations
Chapter Bits, Data Types, and Operations How do we represent data in a computer? At the lowest level, a computer is an electronic machine. works by controlling the flow of electrons Easy to recognize two
More informationChapter 2 Bits, Data Types, and Operations
Chapter 2 Bits, Data Types, and Operations How do we represent data in a computer? At the lowest level, a computer is an electronic machine. works by controlling the flow of electrons Easy to recognize
More informationData Representation and Binary Arithmetic. Lecture 2
Data Representation and Binary Arithmetic Lecture 2 Computer Data Data is stored as binary; 0 s and 1 s Because two-state ( 0 & 1 ) logic elements can be manufactured easily Bit: binary digit (smallest
More informationCPS 104 Computer Organization and Programming Lecture-2 : Data representations,
CPS 104 Computer Organization and Programming Lecture-2 : Data representations, Sep. 1, 1999 Dietolf Ramm http://www.cs.duke.edu/~dr/cps104.html CPS104 Lec2.1 GK&DR Fall 1999 Data Representation Computers
More informationChapter 2 Bits, Data Types, and Operations
Chapter 2 Bits, Data Types, and Operations Original slides from Gregory Byrd, North Carolina State University Modified slides by Chris Wilcox, Colorado State University How do we represent data in a computer?!
More informationRepresenting Things With Bits
Representing Things With Bits Introduction I said above, that what a bit pattern meant depended upon the context. We often want to represent things like characters and numbers in a bit pattern so that
More informationFundamentals of Programming (C)
Borrowed from lecturer notes by Omid Jafarinezhad Fundamentals of Programming (C) Group 8 Lecturer: Vahid Khodabakhshi Lecture Number Systems Department of Computer Engineering Outline Numeral Systems
More informationNumber Systems Base r
King Fahd University of Petroleum & Minerals Computer Engineering Dept COE 2 Fundamentals of Computer Engineering Term 22 Dr. Ashraf S. Hasan Mahmoud Rm 22-44 Ext. 724 Email: ashraf@ccse.kfupm.edu.sa 3/7/23
More information9/3/2015. Data Representation II. 2.4 Signed Integer Representation. 2.4 Signed Integer Representation
Data Representation II CMSC 313 Sections 01, 02 The conversions we have so far presented have involved only unsigned numbers. To represent signed integers, computer systems allocate the high-order bit
More informationChapter 2 Bits, Data Types, and Operations
Chapter 2 Bits, Data Types, and Operations Original slides from Gregory Byrd, North Carolina State University Modified by Chris Wilcox, S. Rajopadhye Colorado State University How do we represent data
More informationNumber System (Different Ways To Say How Many) Fall 2016
Number System (Different Ways To Say How Many) Fall 2016 Introduction to Information and Communication Technologies CSD 102 Email: mehwish.fatima@ciitlahore.edu.pk Website: https://sites.google.com/a/ciitlahore.edu.pk/ict/
More informationAcquirer JCB EMV Test Card Set
Acquirer JCB EMV Test Card Set July, 2017 Powered by Disclaimer Information provided in this document describes capabilities available at the time of developing this document and information available
More informationNumbers and Computers. Debdeep Mukhopadhyay Assistant Professor Dept of Computer Sc and Engg IIT Madras
Numbers and Computers Debdeep Mukhopadhyay Assistant Professor Dept of Computer Sc and Engg IIT Madras 1 Think of a number between 1 and 15 8 9 10 11 12 13 14 15 4 5 6 7 12 13 14 15 2 3 6 7 10 11 14 15
More informationNumber Systems II MA1S1. Tristan McLoughlin. November 30, 2013
Number Systems II MA1S1 Tristan McLoughlin November 30, 2013 http://en.wikipedia.org/wiki/binary numeral system http://accu.org/index.php/articles/18 http://www.binaryconvert.com http://en.wikipedia.org/wiki/ascii
More informationFundamentals of Programming
Fundamentals of Programming Lecture 2 Number Systems & Arithmetic Lecturer : Ebrahim Jahandar Some Parts borrowed from slides by IETC1011-Yourk University Common Number Systems System Base Symbols Used
More informationPositional Number System
Positional Number System A number is represented by a string of digits where each digit position has an associated weight. The weight is based on the radix of the number system. Some common radices: Decimal.
More informationFirst Data Dual Interface EMV Test Card Set. Version 1.20
First Data Dual Interface EMV Test Card Set August, 2016 Disclaimer Information provided in this document describes capabilities available at the time of developing this document and information available
More informationNumber Representations
Simple Arithmetic [Arithm Notes] Number representations Signed numbers Sign-magnitude, ones and twos complement Arithmetic Addition, subtraction, negation, overflow MIPS instructions Logic operations MIPS
More informationBits and Bytes. Data Representation. A binary digit or bit has a value of either 0 or 1; these are the values we can store in hardware devices.
Bits and Bytes 1 A binary digit or bit has a value of either 0 or 1; these are the values we can store in hardware devices. A byte is a sequence of 8 bits. A byte is also the fundamental unit of storage
More informationFirst Data EMV Test Card Set. Version 1.30
First Data EMV Test Card Set.30 January, 2018 Disclaimer Information provided in this document describes capabilities available at the time of developing this document and information available from industry
More informationData Representa5on. CSC 2400: Computer Systems. What kinds of data do we need to represent?
CSC 2400: Computer Systems Data Representa5on What kinds of data do we need to represent? - Numbers signed, unsigned, integers, floating point, complex, rational, irrational, - Text characters, strings,
More informationFirst Data EMV Test Card Set. Version 2.00
First Data EMV Test Card Set.00 February, 2018 Disclaimer Information provided in this document describes capabilities available at the time of developing this document and information available from industry
More informationChapter 2 Bits, Data Types, and Operations
Chapter 2 Bits, Data Types, and Operations Computer is a binary digital system. Digital system: finite number of symbols Binary (base two) system: has two states: 0 and 1 Basic unit of information is the
More information2a. Codes and number systems (continued) How to get the binary representation of an integer: special case of application of the inverse Horner scheme
2a. Codes and number systems (continued) How to get the binary representation of an integer: special case of application of the inverse Horner scheme repeated (integer) division by two. Example: What is
More informationEXPERIMENT 8: Introduction to Universal Serial Asynchronous Receive Transmit (USART)
EXPERIMENT 8: Introduction to Universal Serial Asynchronous Receive Transmit (USART) Objective: Introduction To understand and apply USART command for sending and receiving data Universal Serial Asynchronous
More informationCS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON
CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON Prof. Gurindar Sohi TAs: Pradip Vallathol and Junaid Khalid Midterm Examination 1 In Class (50 minutes) Friday, September
More informationEE 109 Unit 3. Analog vs. Digital. Analog vs. Digital. Binary Representation Systems ANALOG VS. DIGITAL
3. 3. EE 9 Unit 3 Binary Representation Systems ANALOG VS. DIGITAL 3.3 3. Analog vs. Digital The analog world is based on continuous events. Observations can take on any (real) value. The digital world
More informationCS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON
CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON Prof. Gurindar Sohi TAs: Junaid Khalid and Pradip Vallathol Midterm Examination 1 In Class (50 minutes) Friday, September
More informationUnder the Hood: Data Representation. Computer Science 104 Lecture 2
Under the Hood: Data Representation Computer Science 104 Lecture 2 Admin Piazza, Sakai Up Everyone should have access Homework 1 Posted Due Feb 6 PDF or Plain Text Only: No Word or RTF Recommended: Learn
More informationAcquirer JCB Dual Interface EMV Test Card Set
Acquirer JCB Dual Interface EMV Test Card Set.00 July, 2018 Powered by Disclaimer Information provided in this document describes capabilities available at the time of developing and delivering this document
More informationNumber Systems for Computers. Outline of Introduction. Binary, Octal and Hexadecimal numbers. Issues for Binary Representation of Numbers
Outline of Introduction Administrivia What is computer architecture? What do computers do? Representing high level things in binary Data objects: integers, decimals, characters, etc. Memory locations (We
More informationData Representa5on. CSC 2400: Computer Systems. What kinds of data do we need to represent?
CSC 2400: Computer Systems Data Representa5on What kinds of data do we need to represent? - Numbers signed, unsigned, integers, floating point, complex, rational, irrational, - Text characters, strings,
More informationEXPERIMENT 7: Introduction to Universal Serial Asynchronous Receive Transmit (USART)
EXPERIMENT 7: Introduction to Universal Serial Asynchronous Receive Transmit (USART) Objective: To understand and apply USART command for sending and receiving data Introduction Universal Serial Asynchronous
More information3.1. Unit 3. Binary Representation
3.1 Unit 3 Binary Representation ANALOG VS. DIGITAL 3.2 3.3 Analog vs. Digital The analog world is based on continuous events. Observations can take on (real) any value. The digital world is based on discrete
More information4. Specifications and Additional Information
4. Specifications and Additional Information AGX52004-1.0 8B/10B Code This section provides information about the data and control codes for Arria GX devices. Code Notation The 8B/10B data and control
More informationFirst Data DCC Test Card Set. Version 1.30
First Data DCC Test Card Set.30 April, 2018 Disclaimer Information provided in this document describes capabilities available at the time of developing this document and information available from industry
More informationAPPLESHARE PC UPDATE INTERNATIONAL SUPPORT IN APPLESHARE PC
APPLESHARE PC UPDATE INTERNATIONAL SUPPORT IN APPLESHARE PC This update to the AppleShare PC User's Guide discusses AppleShare PC support for the use of international character sets, paper sizes, and date
More informationEE 109 Unit 2. Analog vs. Digital. Analog vs. Digital. Binary Representation Systems ANALOG VS. DIGITAL
EE 9 Unit Binary Representation Systems ANALOG VS. DIGITAL Analog vs. Digital The analog world is based on continuous events. Observations can take on any (real) value. The digital world is based on discrete
More informationCoding Theory. Networks and Embedded Software. Digital Circuits. by Wolfgang Neff
Coding Theory Networks and Embedded Software Digital Circuits by Wolfgang Neff Coding (1) Basic concepts Information Knowledge about something Abstract concept (just in mind, can not be touched) Data Representation
More informationEE 109 Unit 2. Binary Representation Systems
EE 09 Unit 2 Binary Representation Systems ANALOG VS. DIGITAL 2 3 Analog vs. Digital The analog world is based on continuous events. Observations can take on (real) any value. The digital world is based
More informationInterac USA Interoperability EMV Test Card Set
Interac USA Interoperability EMV Test Card Set.00 April, 2018 Powered by Disclaimer Information provided in this document describes capabilities available at the time of developing this document and information
More informationplc numbers Encoded values; BCD and ASCII Error detection; parity, gray code and checksums
plc numbers - 3. 3. NUMBERS AND DATA Topics: Number bases; binary, octal,, hexa Binary calculations; s compliments, addition, subtraction and Boolean operations Encoded values; BCD and ASCII Error detection;
More informationOberon Data Types. Matteo Corti. December 5, 2001
Oberon Data Types Matteo Corti corti@inf.ethz.ch December 5, 2001 1 Introduction This document is aimed at students without any previous programming experience. We briefly describe some data types of the
More informationUNIT 2 NUMBER SYSTEM AND PROGRAMMING LANGUAGES
UNIT 2 NUMBER SYSTEM AND PROGRAMMING LANGUAGES Structure 2.0 Introduction 2.1 Unit Objectives 2.2 Number Systems 2.3 Bits and Bytes 2.4 Binary Number System 2.5 Decimal Number System 2.6 Octal Number System
More informationUnit 3. Analog vs. Digital. Analog vs. Digital ANALOG VS. DIGITAL. Binary Representation
3.1 3.2 Unit 3 Binary Representation ANALOG VS. DIGITAL 3.3 3.4 Analog vs. Digital The analog world is based on continuous events. Observations can take on (real) any value. The digital world is based
More informationExperiment 3. TITLE Optional: Write here the Title of your program.model SMALL This directive defines the memory model used in the program.
Experiment 3 Introduction: In this experiment the students are exposed to the structure of an assembly language program and the definition of data variables and constants. Objectives: Assembly language
More informationFundamental Data Types
Fundamental Data Types Lecture 4 Sections 2.7-2.10 Robb T. Koether Hampden-Sydney College Mon, Sep 3, 2018 Robb T. Koether (Hampden-Sydney College) Fundamental Data Types Mon, Sep 3, 2018 1 / 25 1 Integers
More informationBinary Numbers. The Basics. Base 10 Number. What is a Number? = Binary Number Example. Binary Number Example
The Basics Binary Numbers Part Bit of This and a Bit of That What is a Number? Base Number We use the Hindu-Arabic Number System positional grouping system each position represents a power of Binary numbers
More informationCIS-331 Exam 2 Fall 2015 Total of 105 Points Version 1
Version 1 1. (20 Points) Given the class A network address 117.0.0.0 will be divided into multiple subnets. a. (5 Points) How many bits will be necessary to address 4,000 subnets? b. (5 Points) What is
More informationExercises Software Development I. 03 Data Representation. Data types, range of values, internal format, literals. October 22nd, 2014
Exercises Software Development I 03 Data Representation Data types, range of values, ernal format, literals October 22nd, 2014 Software Development I Wer term 2013/2014 Priv.-Doz. Dipl.-Ing. Dr. Andreas
More informationn NOPn Unary no operation trap U aaa NOP Nonunary no operation trap i
Instruction set Instruction Mnemonic Instruction Addressing Status Specifier Mode Bits 0000 0000 STOP Stop execution U 0000 0001 RET Return from CALL U 0000 0010 RETTR Return from trap U 0000 0011 MOVSPA
More informationCIS-331 Fall 2013 Exam 1 Name: Total of 120 Points Version 1
Version 1 1. (24 Points) Show the routing tables for routers A, B, C, and D. Make sure you account for traffic to the Internet. NOTE: Router E should only be used for Internet traffic. Router A Router
More informationAutoLISP Module 6 Competency Test No.1
AutoCAD Self-paced ecourse AutoLISP Module 6 Competency Test No.1 Learning Outcomes When you have completed this module, you will be able to: 1 Complete a written exam and write an AutoLISP program on
More informationCIS-331 Fall 2014 Exam 1 Name: Total of 109 Points Version 1
Version 1 1. (24 Points) Show the routing tables for routers A, B, C, and D. Make sure you account for traffic to the Internet. Router A Router B Router C Router D Network Next Hop Next Hop Next Hop Next
More informationUnit 3, Lesson 2 Data Types, Arithmetic,Variables, Input, Constants, & Library Functions. Mr. Dave Clausen La Cañada High School
Unit 3, Lesson 2 Data Types, Arithmetic,Variables, Input, Constants, & Library Functions Mr. Dave Clausen La Cañada High School Vocabulary Variable- A variable holds data that can change while the program
More informationCIS-331 Spring 2016 Exam 1 Name: Total of 109 Points Version 1
Version 1 Instructions Write your name on the exam paper. Write your name and version number on the top of the yellow paper. Answer Question 1 on the exam paper. Answer Questions 2-4 on the yellow paper.
More informationFD-011WU. 2D Barcode Reader User Guide V1.6CC
FD-011WU 2D Barcode Reader User Guide V1.6CC Table of Contents 1 Getting Started... 1 1.1 Factory Defaults... 1 2 Communication Interfaces...2 2.1 TTL-232 Interface... 2 2.2 Baud Rate... 3 2.3 Data Bit
More informationUSB-ASC232. ASCII RS-232 Controlled USB Keyboard and Mouse Cable. User Manual
USB-ASC232 ASCII RS-232 Controlled USB Keyboard and Mouse Cable User Manual Thank you for purchasing the model USB-ASC232 Cable HAGSTROM ELECTRONICS, INC. is pleased that you have selected this product
More informationS-Series Sensor ASCII Protocol v8.1.0
S-Series Sensor v8.1.0 Legend: ADR Node/Slave Address TIME STAT Status Byte ERR CTRL Control Byte SP # POS Position DATA TARG Target CHAR VEL Velocity OFF SN CODE PAR # Serial Number Security Code Parameter
More information1. Character/String Data, Expressions & Intrinsic Functions. Numeric Representation of Non-numeric Values. (CHARACTER Data Type), Part 1
Character/String Data, Expressions Intrinsic Functions (CHARACTER Data Type), Part 1 1. Character/String Data, Expressions Intrinsic Functions (CHARACTER Data Type), Part 1 2. Numeric Representation of
More informationCIS-331 Exam 2 Fall 2014 Total of 105 Points. Version 1
Version 1 1. (20 Points) Given the class A network address 119.0.0.0 will be divided into a maximum of 15,900 subnets. a. (5 Points) How many bits will be necessary to address the 15,900 subnets? b. (5
More informationSerial I/O. 4: Serial I/O. CET360 Microprocessor Engineering. J. Sumey
4: Serial I/O CET360 Microprocessor Engineering J. Sumey Introduction serial, i.e. bit-at-a-time, interfacing techniques are useful when parallel interfacing limitations become problematic distance limitations
More informationCharacters Lesson Outline
Outline 1. Outline 2. Numeric Encoding of Non-numeric Data #1 3. Numeric Encoding of Non-numeric Data #2 4. Representing Characters 5. How Characters Are Represented #1 6. How Characters Are Represented
More informationASSIGNMENT 5 TIPS AND TRICKS
ASSIGNMENT 5 TIPS AND TRICKS linear-feedback shift registers Java implementation a simple encryption scheme http://princeton.edu/~cos26 Last updated on /26/7 : PM Goals OOP: implement a data type; write
More informationThe Binary Number System
The Binary Number System Robert B. Heckendorn University of Idaho August 24, 2017 Numbers are said to be represented by a place-value system, where the value of a symbol depends on where it is... its place.
More informationCIS-331 Exam 2 Spring 2016 Total of 110 Points Version 1
Version 1 1. (20 Points) Given the class A network address 121.0.0.0 will be divided into multiple subnets. a. (5 Points) How many bits will be necessary to address 8,100 subnets? b. (5 Points) What is
More informationCSE-1520R Test #1. The exam is closed book, closed notes, and no aids such as calculators, cellphones, etc.
9 February 2011 CSE-1520R Test #1 [7F] w/ answers p. 1 of 8 CSE-1520R Test #1 Sur / Last Name: Given / First Name: Student ID: Instructor: Parke Godfrey Exam Duration: 45 minutes Term: Winter 2011 The
More informationDo not start the test until instructed to do so!
Instructions: Print your name in the space provided below. This examination is closed book and closed notes, aside from the permitted one-page formula sheet. No calculators or other electronic devices
More informationInf2C - Computer Systems Lecture 2 Data Representation
Inf2C - Computer Systems Lecture 2 Data Representation Boris Grot School of Informatics University of Edinburgh Last lecture Moore s law Types of computer systems Computer components Computer system stack
More informationMACHINE LEVEL REPRESENTATION OF DATA
MACHINE LEVEL REPRESENTATION OF DATA CHAPTER 2 1 Objectives Understand how integers and fractional numbers are represented in binary Explore the relationship between decimal number system and number systems
More informationCS341 *** TURN OFF ALL CELLPHONES *** Practice NAME
CS341 *** TURN OFF ALL CELLPHONES *** Practice Final Exam B. Wilson NAME OPEN BOOK / OPEN NOTES: I GIVE PARTIAL CREDIT! SHOW ALL WORK! 1. Processor Architecture (20 points) a. In a Harvard architecture
More informationDigital Logic. The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer.
Digital Logic 1 Data Representations 1.1 The Binary System The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer. The system we
More informationSimple Data Types in C. Alan L. Cox
Simple Data Types in C Alan L. Cox alc@rice.edu Objectives Be able to explain to others what a data type is Be able to use basic data types in C programs Be able to see the inaccuracies and limitations
More informationCOMP2611: Computer Organization. Data Representation
COMP2611: Computer Organization Comp2611 Fall 2015 2 1. Binary numbers and 2 s Complement Numbers 3 Bits: are the basis for binary number representation in digital computers What you will learn here: How
More informationCSE-1520R Test #1. The exam is closed book, closed notes, and no aids such as calculators, cellphones, etc.
9 February 2011 CSE-1520R Test #1 [B4] p. 1 of 8 CSE-1520R Test #1 Sur / Last Name: Given / First Name: Student ID: Instructor: Parke Godfrey Exam Duration: 45 minutes Term: Winter 2011 The exam is closed
More information5/17/2009. Digitizing Discrete Information. Ordering Symbols. Analog vs. Digital
Chapter 8: Bits and the "Why" of Bytes: Representing Information Digitally Digitizing Discrete Information Fluency with Information Technology Third Edition by Lawrence Snyder Copyright 2008 Pearson Education,
More informationChapter 1. Hardware. Introduction to Computers and Programming. Chapter 1.2
Chapter Introduction to Computers and Programming Hardware Chapter.2 Hardware Categories Input Devices Process Devices Output Devices Store Devices /2/27 Sacramento State - CSc A 3 Storage Devices Primary
More informationMidterm Exam, Fall 2015 Date: October 29th, 2015
Full Name: Midterm Exam, Fall 2015 Date: October 29th, 2015 Instructions: This midterm exam takes 70 minutes. Read through all the problems and complete the easy ones first. This exam is OPEN BOOK. You
More informationLecture (09) x86 programming 8
Lecture (09) x86 programming 8 By: Dr. Ahmed ElShafee 1 Basic Input Output System BIOS BIOS refers to a set of procedures or functions that enable the programmer have access to the hardware of the computer.
More informationC1098 JPEG Module User Manual
C1098 JPEG Module User Manual General Description C1098 is VGA camera module performs as a JPEG compressed still camera that can be attached to a wireless or PDA host. Users can send out a snapshot command
More informationSource coding and compression
Computer Mathematics Week 5 Source coding and compression College of Information Science and Engineering Ritsumeikan University last week binary representations of signed numbers sign-magnitude, biased
More informationData Representation COE 301. Computer Organization Prof. Muhamed Mudawar
Data Representation COE 30 Computer Organization Prof. Muhamed Mudawar College of Computer Sciences and Engineering King Fahd University of Petroleum and Minerals Presentation Outline Positional Number
More informationChapter 8. Characters and Strings
Chapter 8 Characters and s OJECTIVES After you have read and studied this chapter, you should be able to Declare and manipulate data of the char data type. Write string processing programs using and uffer
More informationFirst Data U.S. Debit Test Card Set. Version 1.20
First Data U.S. Debit Test Card Set August, 2016 Disclaimer Information provided in this document describes capabilities available at the time of developing this document and information available from
More informationMounting Dimensions / Viewing 2 Mounting Options 3. Wiring Configuration 4. Quick Set up Procedure 5. Changing Intensity 6.
Section Mounting Dimensions / Viewing 2 Mounting Options 3 Section 2 Wiring Configuration 4 Section 3 Quick Set up Procedure 5 Section 4 Changing Intensity 6 Section 5 Option Summary 7 Section 6 Option
More informationRui Wang, Assistant professor Dept. of Information and Communication Tongji University.
Data Representation ti and Arithmetic for Computers Rui Wang, Assistant professor Dept. of Information and Communication Tongji University it Email: ruiwang@tongji.edu.cn Questions What do you know about
More informationJuly Registration of a Cyrillic Character Set. Status of this Memo
Network Working Group Request for Comments: 1489 A. Chernov RELCOM Development Team July 1993 Status of this Memo Registration of a Cyrillic Character Set This memo provides information for the Internet
More informationECHO Process Instrumentation, Inc. Modbus RS485 Module. Operating Instructions. Version 1.0 June 2010
ECHO Process Instrumentation, Inc. Modbus RS485 Module Operating Instructions Version 1.0 June 2010 ECHO Process Instrumentation, Inc. PO Box 800 Shalimar, FL 32579 PH: 850-609-1300 FX: 850-651-4777 EM:
More informationComputer (Literacy) Skills. Number representations and memory. Lubomír Bulej KDSS MFF UK
Computer (Literacy Skills Number representations and memory Lubomír Bulej KDSS MFF UK Number representations? What for? Recall: computer works with binary numbers Groups of zeroes and ones 8 bits (byte,
More informationDo not start the test until instructed to do so!
Instructions: Print your name in the space provided below. This examination is closed book and closed notes, aside from the permitted one-page formula sheet. No calculators or other electronic devices
More information