2013年12月30日 星期一

Division

  1. Division
    • from http://www.asic-world.com/digital/arithmetic4.htmlDivision is another example of combining simple logic function to make a more complex  circuit.  Note that the method shown below ignores the divide-by-0 condition.  (see also Multipliers and dividers)
    • Algorithm 1: attempt subtraction
      • In calculating A / B, the divisor B is repeatedly subtracted from the digits of the dividend (A), after being multiplied either with ’1′ or with ’0′.  This multiplication bit (’1′ or ’0′) is selected for each subtraction step in such a manner that the subtraction result is not negative.  The division result is composed from all the successive multiplication bits while the remainder is the result of the last subtraction step.
      • own workThis algorithm can be implemented by a series of subtractors.  Each subtractor calculates the difference between two input numbers, but if the result is negative the operation is canceled and replaced with a subtraction of zero.
      • Each divider module:
        • contains a 1-bit subtractor with the usual inputs A, B and Li and outputs D and Lo.
        • the output select (OS) signal selects between bit X and A-B.  The signal is connected to the loan output (Lo) of the most significant 1-bit subtractor.
          • 0, means subtraction result was positive → D’ = D.
          • 1, means subtraction result was negative → D’ = X.
        • Inside each divider cell the OS signal selects between bitA and A-B.
        • The outputs can be expressed as a function of the inputs as in:
          own work
      • The complete division can therefore be implemented by a matrix of divider cells connected on rows and columns as shown in figure on the right.
      • Each row performs one multiplication-and-subtraction cycle where the multiplication bit is supplied by the NOT logic gate at the end of each row.  (also see “Combinational arithmetic“)
        own work
      • The number of gates increases with the square width of the numbers being divided.  This limits its use to designs where bit-width is relatively small, typically around 16 bits or below.

沒有留言:

張貼留言

113 學年度第 1 學期 RFID應用課程 Arduino程式

113 學年度第 1 學期 RFID應用課程 Arduino程式 https://www.mediafire.com/file/zr0h0p3iosq12jw/MFRC522+(2).7z/file 內含修改過後的 MFRC522 程式庫 (原程式有錯誤) //定義MFRC522...