AhBoh commited on
Commit
2ec88c2
·
verified ·
1 Parent(s): fee0c45

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +6 -4
  2. index.html +179 -19
  3. prompts.txt +1 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
  title: 74ls00
3
- emoji:
4
- colorFrom: blue
5
- colorTo: gray
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
  title: 74ls00
3
+ emoji: 🐳
4
+ colorFrom: yellow
5
+ colorTo: red
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,179 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>74LS00 NAND Gate Circuit Simulator</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
9
+ <style>
10
+ .gate-body {
11
+ fill: #f3f4f6;
12
+ stroke: #4b5563;
13
+ stroke-width: 2;
14
+ }
15
+ .gate-pin {
16
+ fill: #9ca3af;
17
+ stroke: #4b5563;
18
+ stroke-width: 1;
19
+ }
20
+ .wire {
21
+ stroke: #3b82f6;
22
+ stroke-width: 2;
23
+ fill: none;
24
+ }
25
+ .input-high {
26
+ fill: #10b981;
27
+ }
28
+ .input-low {
29
+ fill: #ef4444;
30
+ }
31
+ .output-high {
32
+ fill: #10b981;
33
+ }
34
+ .output-low {
35
+ fill: #ef4444;
36
+ }
37
+ .logic-probe {
38
+ transition: all 0.3s ease;
39
+ }
40
+ .pin-label {
41
+ font-family: 'Courier New', monospace;
42
+ font-size: 12px;
43
+ user-select: none;
44
+ }
45
+ .circuit-container {
46
+ filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
47
+ }
48
+ .toggle-btn {
49
+ transition: all 0.2s ease;
50
+ }
51
+ .toggle-btn:active {
52
+ transform: scale(0.95);
53
+ }
54
+ </style>
55
+ </head>
56
+ <body class="bg-gray-100 min-h-screen">
57
+ <div class="container mx-auto px-4 py-8">
58
+ <header class="mb-8 text-center">
59
+ <h1 class="text-3xl font-bold text-gray-800 mb-2">74LS00 Quad 2-Input NAND Gate</h1>
60
+ <p class="text-gray-600 max-w-2xl mx-auto">Interactive circuit diagram and truth table for the 74LS00 IC. Click on inputs to toggle their state.</p>
61
+ </header>
62
+
63
+ <div class="flex flex-col lg:flex-row gap-8 items-center lg:items-start">
64
+ <!-- Circuit Diagram -->
65
+ <div class="circuit-container bg-white rounded-xl p-6 flex-1 max-w-2xl">
66
+ <div class="flex justify-between items-center mb-4">
67
+ <h2 class="text-xl font-semibold text-gray-700">Circuit Diagram</h2>
68
+ <button id="reset-btn" class="toggle-btn bg-blue-100 text-blue-700 px-3 py-1 rounded-md text-sm font-medium hover:bg-blue-200">
69
+ <i class="fas fa-sync-alt mr-1"></i> Reset
70
+ </button>
71
+ </div>
72
+
73
+ <div class="overflow-x-auto">
74
+ <svg id="circuit-svg" width="100%" height="300" viewBox="0 0 800 300" class="mx-auto">
75
+ <!-- IC Body -->
76
+ <rect x="200" y="50" width="400" height="200" rx="10" fill="#f3f4f6" stroke="#4b5563" stroke-width="2"/>
77
+
78
+ <!-- IC Label -->
79
+ <text x="400" y="140" font-family="Arial" font-size="24" text-anchor="middle" fill="#1f2937">74LS00</text>
80
+
81
+ <!-- Left Pins (Inputs) -->
82
+ <g id="input-pins">
83
+ <!-- Pin 1 (A1) -->
84
+ <g class="pin" data-pin="1" data-type="input">
85
+ <rect x="190" y="70" width="10" height="20" class="gate-pin input-low" id="pin1"/>
86
+ <text x="180" y="82" class="pin-label" text-anchor="end">1</text>
87
+ <text x="170" y="82" class="pin-label" text-anchor="end">A</text>
88
+ </g>
89
+
90
+ <!-- Pin 2 (B1) -->
91
+ <g class="pin" data-pin="2" data-type="input">
92
+ <rect x="190" y="110" width="10" height="20" class="gate-pin input-low" id="pin2"/>
93
+ <text x="180" y="122" class="pin-label" text-anchor="end">2</text>
94
+ <text x="170" y="122" class="pin-label" text-anchor="end">B</text>
95
+ </g>
96
+
97
+ <!-- Pin 4 (A2) -->
98
+ <g class="pin" data-pin="4" data-type="input">
99
+ <rect x="190" y="150" width="10" height="20" class="gate-pin input-low" id="pin4"/>
100
+ <text x="180" y="162" class="pin-label" text-anchor="end">4</text>
101
+ <text x="170" y="162" class="pin-label" text-anchor="end">A</text>
102
+ </g>
103
+
104
+ <!-- Pin 5 (B2) -->
105
+ <g class="pin" data-pin="5" data-type="input">
106
+ <rect x="190" y="190" width="10" height="20" class="gate-pin input-low" id="pin5"/>
107
+ <text x="180" y="202" class="pin-label" text-anchor="end">5</text>
108
+ <text x="170" y="202" class="pin-label" text-anchor="end">B</text>
109
+ </g>
110
+
111
+ <!-- Pin 9 (A3) -->
112
+ <g class="pin" data-pin="9" data-type="input">
113
+ <rect x="190" y="230" width="10" height="20" class="gate-pin input-low" id="pin9"/>
114
+ <text x="180" y="242" class="pin-label" text-anchor="end">9</text>
115
+ <text x="170" y="242" class="pin-label" text-anchor="end">A</text>
116
+ </g>
117
+
118
+ <!-- Pin 10 (B3) -->
119
+ <g class="pin" data-pin="10" data-type="input">
120
+ <rect x="190" y="270" width="10" height="20" class="gate-pin input-low" id="pin10"/>
121
+ <text x="180" y="282" class="pin-label" text-anchor="end">10</text>
122
+ <text x="170" y="282" class="pin-label" text-anchor="end">B</text>
123
+ </g>
124
+ </g>
125
+
126
+ <!-- Right Pins (Outputs) -->
127
+ <g id="output-pins">
128
+ <!-- Pin 3 (Y1) -->
129
+ <g class="pin" data-pin="3" data-type="output">
130
+ <rect x="600" y="90" width="10" height="20" class="gate-pin output-high" id="pin3"/>
131
+ <text x="615" y="102" class="pin-label">3</text>
132
+ <text x="630" y="102" class="pin-label">Y</text>
133
+ </g>
134
+
135
+ <!-- Pin 6 (Y2) -->
136
+ <g class="pin" data-pin="6" data-type="output">
137
+ <rect x="600" y="170" width="10" height="20" class="gate-pin output-high" id="pin6"/>
138
+ <text x="615" y="182" class="pin-label">6</text>
139
+ <text x="630" y="182" class="pin-label">Y</text>
140
+ </g>
141
+
142
+ <!-- Pin 8 (Y3) -->
143
+ <g class="pin" data-pin="8" data-type="output">
144
+ <rect x="600" y="250" width="10" height="20" class="gate-pin output-high" id="pin8"/>
145
+ <text x="615" y="262" class="pin-label">8</text>
146
+ <text x="630" y="262" class="pin-label">Y</text>
147
+ </g>
148
+ </g>
149
+
150
+ <!-- Power Pins -->
151
+ <g>
152
+ <!-- VCC (Pin 14) -->
153
+ <g>
154
+ <rect x="300" y="30" width="20" height="10" class="gate-pin input-high" id="pin14"/>
155
+ <text x="310" y="22" class="pin-label" text-anchor="middle">14</text>
156
+ <text x="310" y="15" class="pin-label" text-anchor="middle">VCC</text>
157
+ </g>
158
+
159
+ <!-- GND (Pin 7) -->
160
+ <g>
161
+ <rect x="400" y="30" width="20" height="10" class="gate-pin input-low" id="pin7"/>
162
+ <text x="410" y="22" class="pin-label" text-anchor="middle">7</text>
163
+ <text x="410" y="15" class="pin-label" text-anchor="middle">GND</text>
164
+ </g>
165
+ </g>
166
+
167
+ <!-- NAND Gate Symbols -->
168
+ <g>
169
+ <!-- Gate 1 -->
170
+ <path d="M300 80 Q 350 90 400 80" class="wire" stroke-dasharray="5,3"/>
171
+ <path d="M300 120 Q 350 110 400 120" class="wire" stroke-dasharray="5,3"/>
172
+ <path d="M400 80 L 400 120" class="wire"/>
173
+ <path d="M400 100 L 450 100" class="wire"/>
174
+ <circle cx="450" cy="100" r="5" fill="#3b82f6" stroke="#1d4ed8"/>
175
+ <path d="M455 100 L 500 100" class="wire"/>
176
+
177
+ <!-- Gate 2 -->
178
+ <path d="M300 160 Q 350 170 400 160" class="wire" stroke-dasharray="
179
+ </html>
prompts.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ 74ls00 circuit diagrams