電気工学
System Modelerを使うと,電気回路,パワーエレクトロニクス,電気機械を構築し,研究することができます.電気と機械のコンポーネントを組み合せて完全なシステムモデルを構築したり,解析タスクを実行して性能を測定したりできます.
8-Bit Adder
Binary adders are digital circuits often used in computers for basic arithmetic operations. Using the digital library in the standard Modelica library, we have constructed an 8-bit adder that takes two 8-bit integers and calculates their sum.
The 8-Bit Adder Principle
The 8-bit adder adds the numbers digit by digit, as can be seen in the schematic diagram below. In this example, the integers 170 and 51 represent input a and b, respectively, and the resulting output is the sum 221. The first adder does not have any carry‐in, and so it is represented by a half adder (HA) instead of a full adder (FA).

This schematic diagram explains the principle of using half and full adders to calculate the sum of two 8-bit integers.
Going down one level in the calculator model, we can see the eight full adders where the output, c, of one adder constitutes the input, cin, of another. The rightmost adder is in practice a half adder, since the SET component gives a carry‐in of 0. The other adder inputs, denoted a and b, are binary digits that are converted from the original integers. The last step at the bottom of the diagram shows the conversion of the binary result to the final integer sum.
Simulation Result

The input to the calculator is varied using IntegerTable from the Modelica Standard Library. For each set of integers, the sum is calculated and simulated.
Wolfram System Modeler
評価版
ご購入
System ModelerはWindows,macOS,
Linuxで
日本語と英語でご利用になれます »
ご質問やコメントはWolframエキスパートまでお寄せください »