Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const stageTexts: Record<TutorialStageId, StageTexts> = {
'Output {A} + {B} + {Cin} as a two-digit binary number to {C} and {S}. {Cin} is the carry coming up from the next lower digit. The answer is 0 to 3, and 3 is [11] in binary. "{Adding one digit}" is ready to use as a component. This circuit is called a full adder.',
],
steps: [
'Add {A} and {B} with one "{Adding one digit}", then add {Cin} to its {S} with another and output that {S} to {S}. Join the two {C}s with an {Or} and output it to {C}.',
'Add {A} and {B} with one "{Adding one digit}", and add its {S} and {Cin} with another. Connect the {S} of the one adding {Cin} to the output {S} on the right. Join the two {C}s with an {Or} and connect it to the output {C} on the right.',
],
},
"four-bit-adder": {
Expand All @@ -74,7 +74,7 @@ const stageTexts: Record<TutorialStageId, StageTexts> = {
steps: [
'Place four "{Adding with a carry}". From the top, the pins on the right of {Decompose} and on the left of {Aggregate} are the eights, fours, twos and ones digits.',
"For each digit, connect that digit's pin on the upper {Decompose}, which {A} goes into, and on the lower one, which {B} goes into, to the {A} and {B} of one \"{Adding with a carry}\". Connect the {S} of that adder to the same digit's pin of {Aggregate}.",
"Connect the {C} of each digit's adder to the {Cin} of the adder one digit up. The ones digit's adder gets {False} on its {Cin}, and the {C} of the eights digit's adder goes to the output {C} on the right.",
"Connect the {C} of each digit's adder to the {Cin} of the adder one digit up. Connect a {False} to the {Cin} of the ones digit's adder, and the {C} of the eights digit's adder to the output {C} on the right.",
],
},
counter: {
Expand All @@ -85,7 +85,7 @@ const stageTexts: Record<TutorialStageId, StageTexts> = {
],
steps: [
"Place a {FlipFlop}. A {FlipFlop} outputs what it received at the time step before, and [0000] at the first time step. Connect its output to {Count} and to the {7seg} at the top right.",
'Place a {Const}. A {Const} always outputs the value set in its box. Change [00000000] in its box to [0001] and press <constApply> (four bits, to match the {B} it connects to). The "4 bits" below the box is the number of bits of the value.',
'Place a {Const}. A {Const} always outputs the same value. Change [00000000] in its box to [0001] and press <constApply> (four bits, to match the {B} it connects to). The "4 bits" below the box is the number of bits of the value.',
'Place "{Adding four digits}". Connect the output of the {FlipFlop} to its {A}, the {Const} to its {B}, and its {S} to the input of the {FlipFlop}. Then the number the {FlipFlop} outputs plus 1 comes out of the {FlipFlop} at the next time step. {C} is not used.',
"Press the play button <play> and go through the time steps with the right arrow <nextStep>. Press <auto> to go on by itself, one time step a second. The circuit works when the {Display} at the top right shows 0 to F in turn.",
],
Expand Down Expand Up @@ -145,7 +145,7 @@ export const en = {
FLIPFLOP:
"Outputs what it received at the time step before. At the first time step, it outputs [OFF], or a value of all [0] bits if its output has two or more bits.",
CONST:
"Always outputs the value set in its box. To change it, change the value in the box while editing and press <constApply>. The output has as many bits as shown below the box.",
"Always outputs the same value. To change it, change the value in the box while editing and press <constApply>. The output has as many bits as shown below the box.",
BROADCAST: "Repeats a one-bit value over two or more bits.",
ANDN: "[ON] only when every bit of {In} is [1].",
ORN: "[ON] when any bit of {In} is [1].",
Expand Down
24 changes: 12 additions & 12 deletions src/i18n/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ export const ja: Messages = {
},
parts: {
summaries: {
AND: "両方が [ON] のときだけ [ON]。2ビット以上の値では、ビットごとに、両方が [1] のビットだけ [1] になる。",
OR: "少なくとも一方が [ON] なら [ON]。2ビット以上の値では、ビットごとに、少なくとも一方が [1] のビットが [1] になる。",
AND: "両方の入力が [ON] のときだけ [ON]。2ビット以上の値では、ビットごとに、両方が [1] のビットだけ [1] になる。",
OR: "少なくとも一方の入力が [ON] なら [ON]。2ビット以上の値では、ビットごとに、少なくとも一方が [1] のビットが [1] になる。",
NOT: "[ON] と [OFF] を逆にする。2ビット以上の値では、ビットごとに [1] と [0] を逆にする。",
XOR: "片方だけが [ON] のとき [ON]。2ビット以上の値では、ビットごとに、片方だけが [1] のビットが [1] になる。",
XOR: "片方の入力だけが [ON] のとき [ON]。2ビット以上の値では、ビットごとに、片方だけが [1] のビットが [1] になる。",
TRUE: "いつも [ON]。出力が2ビット以上なら、すべてのビットが [1]。",
FALSE: "いつも [OFF]。出力が2ビット以上なら、すべてのビットが [0]。",
DECOMPOSE: "2ビット以上の値を、上の桁から順に、上のピンへ分ける。",
AGGREGATE: "上のピンを上の桁として、値を1つにまとめる。",
FLIPFLOP:
"1つ前のステップで受け取った値を出す。最初のステップでは [OFF] を、出力が2ビット以上ならすべてのビットが [0] の値を出す。",
CONST:
"欄で決めた値をいつも出す。値は、編集中に欄を書きかえて<constApply>を押すと変わる。出力のビット数は、欄の下に表示されるビット数。",
"いつも同じ値を出す。値は、編集中に欄を書きかえて<constApply>を押すと変わる。出力のビット数は、欄の下に表示されるビット数。",
BROADCAST: "1ビットの値を、同じ値が並んだ2ビット以上の値に広げる。",
ANDN: "{In} のビットがすべて [1] のときだけ [ON]。",
ORN: "{In} のどれかのビットが [1] なら [ON]。",
Expand All @@ -32,9 +32,9 @@ export const ja: Messages = {
DISPLAY:
"再生中、{Pixels} の値を、1ビットを1ピクセルとして絵にする([1] は黒、[0] は白)。上の桁から順に、行優先なら左上から横に1行ずつ、列優先なら縦に1列ずつ並ぶ。解像度とピクセルの並び順は、編集中に歯車のボタンで変えられる。",
INPUT:
"置いた先のコンポーネントに、入力を1つ足す。そのコンポーネントをほかのコンポーネントの中に置くと、入力は左側のピンになる。再生中は、置いた {Input} の上で値を変えられる。",
"コンポーネントの中に置くと、そのコンポーネントの入力になる。そのコンポーネントをほかのコンポーネントの中に置くと、入力は左側のピンになる。再生中は、置いた {Input} の上で値を変えられる。",
OUTPUT:
"置いた先のコンポーネントに、出力を1つ足す。そのコンポーネントをほかのコンポーネントの中に置くと、出力は右側のピンになる。再生中は、受け取った値を見せる。",
"コンポーネントの中に置くと、そのコンポーネントの出力になる。そのコンポーネントをほかのコンポーネントの中に置くと、出力は右側のピンになる。再生中は、受け取った値を見せる。",
},
pinBitWidth: (pinName, canAddPins) =>
canAddPins
Expand Down Expand Up @@ -210,7 +210,7 @@ export const ja: Messages = {
"{A}+{B}+{Cin} の答えを、2桁の2進数で {C} と {S} に出しましょう。{Cin} は、下の桁から来る桁上がりです。答えは 0 から 3 で、3 は2進数で [11] です。「{1桁の足し算}」をコンポーネントとして使えます。この回路を「全加算器」といいます。",
],
steps: [
"「{1桁の足し算}」の1つで {A} と {B} を足し、もう1つでその {S} と {Cin} を足して、その {S} を {S} に出します。2つの {C} は {Or} でまとめて、{C} に出します。",
"「{1桁の足し算}」の1つで {A} と {B} を足し、もう1つでその {S} と {Cin} を足します。{Cin} を足したほうの {S} を右の出力 {S} に、2つの {C} を {Or} でまとめたものを右の出力 {C} につなぎます。",
],
},
"four-bit-adder": {
Expand All @@ -222,7 +222,7 @@ export const ja: Messages = {
steps: [
"「{桁上がりつきの足し算}」を4つ置きます。{Decompose} の右側のピンと {Aggregate} の左側のピンは、どちらも上から8の位・4の位・2の位・1の位です。",
"桁ごとに、{A} につないだ上の {Decompose} と、{B} につないだ下の {Decompose} から、その桁のピンを1つの「{桁上がりつきの足し算}」の {A} と {B} につなぎます。その足し算の {S} は、{Aggregate} の同じ桁のピンにつなぎます。",
"それぞれの桁の足し算の {C} を、1つ上の桁の足し算の {Cin} につなぎます。1の位の足し算の {Cin} には {False} を、8の位の足し算の {C} は右の出力 {C} につなぎます。",
"それぞれの桁の足し算の {C} を、1つ上の桁の足し算の {Cin} につなぎます。1の位の足し算の {Cin} には {False} をつなぎ、8の位の足し算の {C} は右の出力 {C} につなぎます。",
],
},
counter: {
Expand All @@ -233,7 +233,7 @@ export const ja: Messages = {
],
steps: [
"{FlipFlop} を置きます。{FlipFlop} は、1つ前のステップで受け取った値を出します。最初のステップでは [0000] を出します。{FlipFlop} の出力を、{Count} と、右上の {7seg} につなぎます。",
"{Const} を置きます。{Const} は、欄で決めた値をいつも出します。欄の [00000000] を [0001] に書きかえて、<constApply>を押します(つなぐ先の {B} に合わせて、4ビットで書きます)。欄の下の「4 ビット」は、書いた値のビット数です。",
"{Const} を置きます。{Const} は、いつも同じ値を出します。欄の [00000000] を [0001] に書きかえて、<constApply>を押します(つなぐ先の {B} に合わせて、4ビットで書きます)。欄の下の「4 ビット」は、書いた値のビット数です。",
"「{4桁の足し算}」を置き、{FlipFlop} の出力を {A} に、{Const} を {B} に、{S} を {FlipFlop} の入力につなぎます。こうすると、{FlipFlop} が出している数に 1 を足した数が、次のステップで {FlipFlop} から出てきます。{C} は使いません。",
"再生ボタン<play>を押し、右の矢印<nextStep>でステップを進めます。<auto>を押すと、1秒に1ステップずつひとりでに進みます。右上の {Display} に 0 から F が順に出れば、うまく動いています。",
],
Expand All @@ -247,7 +247,7 @@ export const ja: Messages = {
],
steps: [
"左の {Const}・{Broadcast}・{And} は、{Up} が [ON] のときは [0001] を、[OFF] のときは [0000] を「{4桁の足し算}」の {B} に送っています。{Broadcast} は、1ビットの値を、同じ値が並んだ2ビット以上の値に広げます([ON] なら [1111]、[OFF] なら [0000])。{And} に2ビット以上の値をつなぐと、ビットごとに、両方が [1] のビットだけ [1] になります。",
"{Carry} を作ります。[0000] から [1001] のうち、8の位と1の位がどちらも [1] なのは [1001] だけです。一番下の {Decompose} の右側の、一番上(8の位)と一番下(1の位)のピンを {And} でまとめ、その出力と {Up} をもう1つの {And} でまとめて、{Carry} につなぎます。",
"{Carry} を作ります。[0000] から [1001] のうち、8の位と1の位がどちらも [1] なのは [1001] だけです。下にある {Decompose} の右側の、いちばん上(8の位)といちばん下(1の位)のピンを {And} でまとめ、その出力と {Up} をもう1つの {And} でまとめて、{Carry} につなぎます。",
"{Broadcast} を置き、右側のピンをクリックします。出てきた欄はビット幅、つまり出力のビット数です。1 を 4 に書きかえて<pinApply>を押すと、出力が4ビットになります。線をつなぐ前にしておきます。",
"{Carry} が [ON] のときに [0000] に戻す部分を作ります。{S} はまだ {FlipFlop} につながっていません。{Carry} につないだ {And} の出力を {Not} にもつないで反対にし、その {Broadcast} で4ビットに広げ、{S} と {And} でまとめて、{FlipFlop} の入力につなぎます。",
"再生中は、{Up} をクリックして [ON] と [OFF] を切り替えながら、右の矢印<nextStep>でステップを進めます。{Up} が [ON] のときだけ {Display} の数が進み、9 の次に 0 に戻れば、うまく動いています。",
Expand All @@ -256,9 +256,9 @@ export const ja: Messages = {
stopwatch: {
title: "ストップウォッチ",
goal: [
"いよいよ、分と秒を 12:34 のように数えるストップウォッチです。{Start} が [ON] のステップごとに、1秒ずつ進めます。右上の {Display} には、左から分の10の位({M10})、分の1の位({M1})、コロン、秒の10の位({S10})、秒の1の位({S1})が出ます。{M10} と {S10} は 0 から 5 を、{M1} と {S1} は 0 から 9 を数えます。59:59 の次は 00:00 に戻ります。",
"いよいよ、分と秒を 12:34 のように数えるストップウォッチです。{Start} が [ON] のステップごとに、1秒ずつ進みます。右上の {Display} には、左から分の10の位({M10})、分の1の位({M1})、コロン、秒の10の位({S10})、秒の1の位({S1})が出ます。{M10} と {S10} は 0 から 5 を、{M1} と {S1} は 0 から 9 を数えます。59:59 の次は 00:00 に戻ります。",
"{Display} の左にある {7seg}・{Const}・{Decompose}・{Aggregate} は、4つの数字とコロンを1つの {Display} に並べるためのものです。",
"<check>は、{Start} を [ON] にしたまま、59:59 の次に 00:00 に戻るまで進めます。そのあと2ステップだけ {Start} を [OFF] にして止まるかを、また [ON] にしてまた進むかを調べます。",
"<check>は、{Start} を [ON] にしたまま、59:59 の次に 00:00 に戻るまで進めます。そのあと2ステップだけ {Start} を [OFF] にして止まるかを、再び [ON] にしてまた進むかを調べます。",
],
steps: [
"「{0〜5 のカウンタ}」を2つと、「{0〜9 のカウンタ}」を2つ置きます。「{0〜5 のカウンタ}」は「{0〜9 のカウンタ}」と同じつくりで、9 の次ではなく 5 の次で 0 に戻り、上の桁に桁上がりを知らせます。",
Expand Down
Loading