Skip to content
This repository was archived by the owner on Apr 25, 2026. It is now read-only.

Commit 2d2146b

Browse files
committed
more
1 parent d206a16 commit 2d2146b

4 files changed

Lines changed: 26 additions & 23 deletions

File tree

src/pages/SequentialCircuits/SeqIntro.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import SeqTable from "./components/SeqTable";
55
import SeqGrid from "./components/SeqGrid";
66
import SeqDiagram from "./components/SeqDiagram";
77
import SeqGridData from "./data/SeqGridData";
8+
import SeqBoxData from "./data/SeqBoxData";
89
import SeqBoxInfo from "./components/SeqBoxInfo";
910
import SeqBoxSuccess from "./components/SeqBoxSuccess";
1011

@@ -14,7 +15,7 @@ const SeqIntro = () => (
1415
subtitle="Understanding circuits with memory — where outputs depend on both current inputs and past history."
1516
>
1617
<div className="seq-content-body">
17-
<SeqBox />
18+
<SeqBox data={SeqBoxData.sequentialcircuit} />
1819
<h2>Combinational vs Sequential</h2>
1920
<p>
2021
In a <strong>combinational circuit</strong>, output is determined purely

src/pages/SequentialCircuits/SeqLatches.jsx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import React, { useState } from "react";
22
import SeqLayout from "./SeqLayout";
3+
import SeqBox from "./components/SeqBox";
4+
import SeqBoxData from "./data/SeqBoxData";
35

46
const SRLatchSim = () => {
57
const [S, setS] = useState(0);
@@ -122,16 +124,7 @@ const SeqLatches = () => (
122124
subtitle="The simplest bistable memory elements — level-sensitive storage that responds directly to input levels."
123125
>
124126
<div className="seq-content-body">
125-
<div className="seq-box">
126-
<span className="seq-box-title">What is a Latch?</span>
127-
<p>
128-
A <strong>latch</strong> is a bistable multivibrator — a circuit with
129-
two stable output states (0 and 1). It is the most primitive memory
130-
element and is <strong>level-sensitive</strong>: it responds
131-
continuously while the enable signal is asserted, not just at a clock
132-
edge.
133-
</p>
134-
</div>
127+
<SeqBox data={SeqBoxData.sequentialcircuit} />
135128

136129
<h2>SR Latch — NOR Implementation</h2>
137130
<p>
Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
export default function SeqBox() {
1+
export default function SeqBox({ data }) {
2+
if (!data) return null;
23
return (
3-
<>
4-
<div className="seq-box">
5-
<span className="seq-box-title">Core Definition</span>
6-
<p>
7-
A <strong>sequential circuit</strong> is a digital circuit whose
8-
output depends not only on the current inputs but also on the{" "}
9-
<strong>history of past inputs</strong>. It contains memory elements
10-
that store state information between clock cycles.
11-
</p>
12-
</div>
13-
</>
4+
<div className="seq-box">
5+
<span className="seq-box-title">{data.title}</span>
6+
<p>{data.description()}</p>
7+
</div>
148
);
159
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
let SeqBoxData = {
2+
sequentialcircuit: {
3+
title: "Core Definition",
4+
description: () => (
5+
<>
6+
A <strong>sequential circuit</strong> is a digital circuit whose output
7+
depends not only on the current inputs but also on the{" "}
8+
<strong>history of past inputs</strong>. It contains memory elements
9+
that store state information between clock cycles.
10+
</>
11+
),
12+
},
13+
};
14+
15+
export default SeqBoxData;

0 commit comments

Comments
 (0)