cs1101_09A_lec14 - 1 Decimal Integer to Binary Convert a...

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

View Full Document Right Arrow Icon
CS1101 - Lec02 1 Decimal Integer to Binary Convert a positive decimal integer to bin ary using repeated division Step 1 - divide the value by two and reco rd the remainder Step 2 - continue to divide the quotient b y two and record the remainder, until the newest quotient becomes zero Step3 - the binary representation is the r emainders listed from right to left in the o rder they were recorded E.g., what's the binary f or integer 13? 13 ÷ 2 = 6 ··· 1 6 ÷ 2 = 3 ··· 0 3 ÷ 2 = 1 ··· 1 1 ÷ 2 = 0 ··· 1 Answer:  1 1 0 1 Quotient Reminder Divisor Dividen d
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS1101 - Lec02 2 Decimal Fraction to Binary Convert a positive decimal fraction to bina ry using repeated multiplication Step 1 - multiply the fraction by two and record th e integer digit of the result Step 2 - disregard the integer part, and continue t o multiply the fraction part by two, until the newes t fraction part becomes point zero or there is a re peated digit pattern Step3 - the binary representation is the integer di
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

cs1101_09A_lec14 - 1 Decimal Integer to Binary Convert a...

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

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