This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Adding binary numbers Adding binary numbers is very similar to adding decimal numbers, first an example: Let's look at the above example step by step: 1 + 1 = 0 (carry one) 1 + 1 (+ the carry) = 1 (carry one) 0 + 1 (+ the carry) = 0 (carry one) 1 + 0 (+ the carry) = 0 (carry one) 1 + 0 (+ the carry) = 0 (carry one) 0 + 1 (+ the carry) = 0 (carry one) 1 + 0 (+ the carry) = 0 (carry one) The last carry is placed at the left hand side of the result giving: 10000010 Subtracting binary numbers The most common way of subtracting binary numbers is done by first taking the second value (the number to be subtracted) and apply what is known as two's complement , this is done in two steps: 1. complement each digit in turn (change 1 for 0 and 0 for 1). 2. add 1 (one) to the result. note: the first step by itself is known as...
View Full Document
This note was uploaded on 02/10/2011 for the course ICE 4M1 taught by Professor Deabr during the Spring '11 term at Spring Arbor University.
- Spring '11