SOEN228_11w_week9supp

SOEN228_11w_week9supp - SOEN229 11w Week 9 supplemental...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: SOEN229 11w Week 9 supplemental NASM arithmetic Data Representation Numbering Systems Decimal System the number 123 represents: 1*10 2 + 2*10 1 + 3*10 or 100+20+3 The Binary Numbering System the binary value 11001010 2 represents: Conversions convert decimal to binary Successive division by 2, build the binary by concatenating the remainders 202/2 = 101, remainder is 0 2 101/2=50, remainder is 1 2 1 50/2=25 remainder is 0 2 2 25/2=12 remainder is 1 2 3 12/2=6 remainder is 0 2 4 6/2=3 remainder is 0 2 5 3/2=1 remainder is 1 2 6 1/2 =0 remainder is 1 2 7 Result = 1100101 Hexadecimal Shorthand notation for binary, 4 bits at a time 11001010 can be represented as 1100 1010 = CAh Note that 4 bits give 16 combinations, from 0 to 15. In Hex, we refer to 10 as A, 11 as B, etc. 1010 = 10 in decimal = A in hex 1011 = 11 in decimal = B in hex 1100 = 12 in decimal = C in hex 1101 = 13 in decimal = D in hex 1110 = 14 in decimal = E in hex 1111 = 15 in decimal = F in hex Conversion to decimal Binary to decimal Multiplication by successive powers of 2 11001010 1*2 7 + 1*2 6 + 0*2 5 + 0*2 4 + 1*2 3 + 0*2 2 + 1*2 1 + 0*2 » = 128 + 64 + 8 + 2 » = 202 10 (as in previous slide) Hex to decimal Multiplication by successive powers of 16. For example, the number 1234 16 is equal to: » 1 * 16 3 + 2 * 16 2 + 3 * 16 1 + 4 * 16 » or » 4096 + 512 + 48 + 4 = 4660 10 . Unsigned and signed integers in binary Unsigned...
View Full Document

This note was uploaded on 06/30/2011 for the course SOEN 228 taught by Professor T.fancott during the Winter '11 term at Concordia Canada.

Page1 / 16

SOEN228_11w_week9supp - SOEN229 11w Week 9 supplemental...

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

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