1 / 12

Binary Arithmetic

Binary Arithmetic. Everything a computer does is based on mathematical equations But computers can only carry out simple functions So the equations have to worked out in terms of what the computer is capable of

clio
Download Presentation

Binary Arithmetic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Binary Arithmetic

  2. Everything a computer does is based on mathematical equations • But computers can only carry out simple functions • So the equations have to worked out in terms of what the computer is capable of • Therefore very complicated functions are broken down into a step by step process by a program Why?

  3. The program executes each step (instruction) • Solutions to even relatively simple problems can take many thousands of steps • But because the computer can execute millions of instructions per second the results seem almost instantaneous • Binary arithmetic is the beating heart of every computer system Binary Arithmetic

  4. As in normal maths computer need to be able to work with negative numbers • Signed binary numbers have the MSB to indicate whether the number is positive or negative • Unsigned binary numbers are presumed to be positive • When the MSB = 1 then the number = negative • When the MSB = 0 th……………………… = positive Signed or unsigned

  5. Operand = a number upon which an arithmetic function operates (e.g. x + y = z x,y are the operands) • Augend = the number in an addition operation to which another number is added • Addend = the number in and addition operation that is added to another • Sum = the result of an addition operation • Carry = A digit that is carried over to the next most significant position if the sum of digits is too large to be expressed as a single digit Key terms for Addition

  6. 0 + 0 = 00 • 1 + 0 = 01 • 1 + 1 = 10 (110 + 110 = 210) • 1 + 1 + 1 = 11 Sum bit Carry bit Addition rules

  7. Lets apply the rules of addition

  8. 10010 = 18 • 1010 = 10 • 11100 = 16 + 8 + 4 + 0 + 0 = 28 • Now write 28 in hex • Calculate 1010011 + 11100 Check your work

  9. Difference = The result of the subtraction operation • Minuend = The number in a subtraction operation from which another number is subtracted • Subtrahend = the opposite of minuend • Borrow = a digit brought back from a more significant position when the subtrahend digit is larger than the minuend digit Binary subtraction

  10. 0 – 0 = 0 • 1 – 0 = 1 • 1 – 1 = 0 • 10 – 1 = 1 Binary Subtraction rules

  11. Lets apply the rules of binary subtraction

  12. 1110 = 14 • 1001 = 9 • 0101 = 5 • Calculate 110011 - 011010 Check your work

More Related