Tuesday, September 9, 2014

Arithmetic Instructions

vAddition
  - when adding binary numbers, the microprocessor produces two types of information:
  1. the sum of the two numbers (answer);
  2. information indicating whether there were carries in certain columns.



vCarry Flag
  - during addition, the 8- bit sum is not the complete answer. If the carry flag is set (has a value of 1), it indicates that the 9th bit was produced.
  -the 1 in the carry flag would indicate a carry from column 8 to column 9.
  - we cannot see a 9th bit since the accumulator only holds 8 bit.
vHalf-Carry Flag

  - indicates that a carry has occurred from the 4th- bit column to the 5th-bit column.
vOverflow Flag
  - alerts the programmer to a condition that is similar to, but not the same as, that to which a carry flag alerts the programmer.
vAddition with Carry
  - the carry from the 8th bit to the 9th bit can be used during multiple- precision arithmetic. We use the multiple- precision arithmetic when the accumulator cannot accept numbers large enough for the desired operation.

9 comments:

  1. Thanks again sir for this,we already encountered this "carry" in programming.What it means here is its function as an instruction.
    Nice one! :-D:-)

    ReplyDelete
  2. its good you have provided clear instructions for your students :)

    ReplyDelete
  3. thanks for sharing your knowledge with us. this is very informative :) looking forward for more of your tutorials :)

    ReplyDelete
  4. sir contrast po ung kulay...hehehe joke lang

    ReplyDelete
  5. naalala q nung nireport mo to sir, prang sabog ka lng. hahaha
    pro nagets q nman khit pano. :)

    rollonRJS

    ReplyDelete

  6. Salamat sa info sir.

    Jerome Partosa

    ReplyDelete
  7. There are only 10 types of person in the world: those who understand binary,and those who don't


    Ramos,Adonis

    ReplyDelete