Besiege

Besiege

Not enough ratings
Division Core 除法核心
   
Award
Favorite
Favorited
Unfavorite
Types: Levels
File Size
Posted
Updated
746.868 KB
2 Jul, 2021 @ 10:23am
9 Jul, 2021 @ 3:40am
4 Change Notes ( view )

Subscribe to download
Division Core 除法核心

In 2 collections by Nice Name
Nice Name Science
116 items
Logic Systems
12 items
Description
Using only one block to run, Division Core is a level logic system that allows you to divide variables easily, instantaneously, and without any lag.
除法核心是一個能讓使用者輕鬆操作、不會當機且能瞬間完成計算的變數除法工具,且只需一個方塊就能運作。

*****DO NOT OPEN THE LOGIC PAGE OF THE CUBE IT WILL DESTROY YOUR GAME*****
*****不 要 打 開 方 塊 的 邏 輯 頁 面 它 會 炸 了 你 的 遊 戲*****

To input the numbers (i ≠0):
若要輸入變數 (i ≠0)
Variable "i = -16383~16383", Division Core
Variable "i = -16383~16383", Division Core
Yes they share a same VarName. The product of the division could not reach over 16383, and it will not output "0" as the quotient.
沒錯它們共用一個變數。商數臨界值為16383,且不會輸出「0」。

Once the 2 variables are inputted, the calculation will automatically start.
兩變數一旦輸入,計算就會直接開始。

The default output variable name is:
預設的商數輸出變數為:
Variable "o =(quotient 商數)"

The default Remainder output is:
預設的餘數輸出變數為:
Variable "remainder =(remainder 餘數)"

(Remainder is a bit bugged, I'll fix it soon.)
(餘數有點問題,我會盡快修好它。)

How it work? 運作原理
  1. Convert variable inputs into binary data.
    將輸入的變數轉為二進位資料。
  2. Use Multiplication Core to "divide" the two variables. Using just words to explain the logic of the calculation is a bit hard for me, so I will use an example to explain instead:
    乘法核心來將兩變數「相除」。用文字來解釋除法計算的邏輯有些困難,因此我會以範例來解釋:
    Input 輸入:201 / 10 (11001001₂ / 1010₂)
    loop = 14 loops for multiplication and additional 1 loop for remainder check
    14. 1010₂ * 10000000000000₂ > 11001001₂
    13. 1010₂ * 1000000000000₂ > 11001001₂
    12. 1010₂ * 100000000000₂ > 11001001₂
    11. 1010₂ * 10000000000₂ > 11001001₂
    10. 1010₂ * 1000000000₂ > 11001001₂
    9. 1010₂ * 100000000₂ > 11001001₂
    8. 1010₂ * 10000000₂ > 11001001₂
    7. 1010₂ * 1000000₂ > 11001001₂
    6. 1010₂ * 100000₂ > 11001001₂
    5. 1010₂ * 10000₂ < 11001001₂, #quotient 商 + 10000₂
    4. 1010₂ * 11000₂ > 11001001₂
    3. 1010₂ * 10100₂ < 11001001₂, #quotient 商 +100₂
    2. 1010₂ * 10110₂ > 11001001₂
    1. 1010₂ * 10101₂ > 11001001₂
    0. 11001001₂ - 1010₂ * 10100₂ = 1₂, #remainder 餘 =1
    quotient 商 = 10100₂
    remainder 餘 = 1₂

  3. Convert the binary quotient into decimal output.
    將二進位除商轉為十進位輸出。

Logic overview is not 100% up to date and is subject to practicality.
邏輯總覽非最新版本,所有邏輯皆以實品為主。

210709 UPDATE
Removed the need of the starting logic "start +0".
移除了啟動邏輯「start +0」。