218L2F08a - ESE218 Lecture 2 Outline Number systems. Binary...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
9/4/2008 ESE218 Fall 2008 Lecture 2 1 ESE218 Lecture 2 Number systems. Binary arithmetic. Negative numbers Outline ± Number systems: Binary, Octal, Hexadecimal vs Decimal ± Decimal-to-Binary conversion ± Binary arithmetic ² Addition, subtraction, multiplication, division ± Negative numbers ² Signed magnitude ² Complement system ± Decimal integers with sign ² 10’s complements ² 9’s complements ± Binary integers with sign ² 1’s complements ² 2’s complements ± Summary
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
9/4/2008 ESE218 Fall 2008 Lecture 2 2 Binary Number Systems Binary Decimal 9 8 7 6 5 4 3 2 1 0 1 0 10 digits 2 digits 1 Bit = Bi nary digit 1 Tetrad = 4 bits 1 Byte = 8 bits 218 10 = 2 x 100 + 1 x10 + 8 11011010 2 = 1x128 + 1x64 + 1x16 + 1x8 + 1x2 High voltage Low voltage Logical 1 Logical 0 Binary format is understandable by hardware
Background image of page 2
9/4/2008 ESE218 Fall 2008 Lecture 2 3 Kilo, Mega, Giga, Tera, Peta, Exa… 1024 10 512 9 256 8 128 7 64 6 32 5 16 4 8 3 4 2 2 1 2 n n 1 kB = 2 10 = 1024 B 1 GB = 2 30 = 1024 MB 1 TB =2 40 = 1024 GB 1 MB = 2 20 = 1024 kB = 1,048,576 B ~ Kilo in binary world means a bit more than just a thousand 10 3 10 6 10 9 10 12 10 15 10 18 1 PB =2 50 = 1024 TB 1 EB =2 60 = 1024 PB
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
9/4/2008 ESE218 Fall 2008 Lecture 2 4 Popular data formats and ranges Unsigned integers: 8 bits: 0…255 16 bits: 0…65535 2 8 -1 2 16 -1 Signed integers: 8 bits -127…127 16 bits: +32767 … -32767 Negative Sign occupies one digit position => the number range is ` twice shorter Floating point*: Single precision: 32 bits S EEEEEEEE FFFFFFFFFFFFFFFFFFFFFFF 0 1 8 9 ……… 31 Sign - Exponent ( 8 bits ) - Mantissa (23 bits) Range: 2 -126 …2 127 up to ~10 38 Double precision: 64 bits for numbers up to ~10 308 *In this course we will work with integer numbers only
Background image of page 4
9/4/2008 ESE218 Fall 2008 Lecture 2 5 Positional Number Systems i m n i i r a N = = n n o m m n n n n m m m m a a a a a a r a r a r a a r a r a r a N + + + = + + + + + + + + + = 1 1 1 1 1 1 1 0 1 1 1 ... . ... ... ... point Fractional part m,n – positive integers r – radix or base a i – coefficients (digits) Integer part
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
9/4/2008 ESE218 Fall 2008 Lecture 2 6 Binary Number Systems Hexadecimal Octal 7 6 5 4 3 2 1 0 F E D C B A 9 8 . . 2 1 0 8 digits 16 digits 3 3 2 218 10 = 1 1 0 1 1 0 1 0 2 = 332 8 = DA 16 D A HEX is the most popular format (convenient for designers)
Background image of page 6
9/4/2008 ESE218 Fall 2008 Lecture 2 7 Integer numbers C 14 1100 12 B 13 1011 11 A 12 1010 10 E 16 1110 14 D 15 1101 13 1111 1001 1000 111 110 101 100 11 10 1 0 Binary 15 9 8 7 6 5 4 3 2 1 0 Decimal Hexadecimal Octal F 17 9 11 8 10 7 7 6 6 5 5 4 4 3 3 2 2 1 1 0 0
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
9/4/2008 ESE218 Fall 2008 Lecture 2 8 Decimal-to-Binary Conversion To be performed separately for integer and
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/21/2010 for the course ESE 218 taught by Professor Donetsky during the Fall '08 term at SUNY Stony Brook.

Page1 / 24

218L2F08a - ESE218 Lecture 2 Outline Number systems. Binary...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online