dld-books 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,79 @@
1
+ # Digital Logic Design Books
2
+
3
+ A community-driven JavaScript dataset of solved **Digital Logic Design** questions.
4
+
5
+ This repository currently includes structured chapter-wise solutions from **Logic and Computer Design Fundamentals** in [`dld-books-solutions.js`](./dld-books-solutions.js).
6
+
7
+ ## Project Goals
8
+
9
+ - Build a clean, structured collection of DLD solved problems.
10
+ - Keep answers short, practical, and easy to search.
11
+ - Expand coverage to more chapters and books over time.
12
+
13
+ ## Repository Structure
14
+
15
+ - `dld-books-solutions.js`: Main dataset exported as JavaScript objects.
16
+ - `package.json`: Project metadata.
17
+
18
+ ## Usage
19
+
20
+ ### 1. Clone the repository
21
+
22
+ ```bash
23
+ git clone https://github.com/SENODROOM/Digital-Logic-Design-Books.git
24
+ cd Digital-Logic-Design-Books
25
+ ```
26
+
27
+ ### 2. Import the data in JavaScript
28
+
29
+ ```js
30
+ import { logic_and_computer_design_fundamental } from './dld-books-solutions.js';
31
+
32
+ console.log(logic_and_computer_design_fundamental.Ch1[0]);
33
+ ```
34
+
35
+ ## Data Format
36
+
37
+ Each question entry follows this structure:
38
+
39
+ ```js
40
+ {
41
+ id: '1-1',
42
+ category: '...',
43
+ title: '...',
44
+ question: '...',
45
+ shortAnswer: '...'
46
+ }
47
+ ```
48
+
49
+ ## Contributing
50
+
51
+ Contributions are welcome and needed.
52
+
53
+ If you want to help, you can:
54
+
55
+ - Add new solved questions.
56
+ - Improve correctness of existing answers.
57
+ - Improve wording and formatting for readability.
58
+ - Add solutions from additional DLD books.
59
+ - Report mistakes through issues.
60
+
61
+ ### Contribution Steps
62
+
63
+ 1. Fork the repository.
64
+ 2. Create a branch: `git checkout -b feat/your-change`.
65
+ 3. Make your changes.
66
+ 4. Commit clearly: `git commit -m "Add ChX solved problems"`.
67
+ 5. Push and open a Pull Request.
68
+
69
+ Please keep submissions consistent with the existing object structure and chapter grouping.
70
+
71
+ ## Issues
72
+
73
+ Found an error or missing solution?
74
+
75
+ Open an issue here: [GitHub Issues](https://github.com/SENODROOM/Digital-Logic-Design-Books/issues)
76
+
77
+ ## License
78
+
79
+ ISC
@@ -0,0 +1,503 @@
1
+ export const logic_and_computer_design_fundamental = {
2
+ Ch1: [
3
+ {
4
+ id: '1-1',
5
+ category: 'Wind Sensor & Binary Conversion',
6
+ title: 'Wind Measurement System - Anemometer Signal Processing',
7
+ question: 'This problem concerns wind measurements made by the wireless weather station. The wind speed is to be measured with a rotating anemometer connected by a shaft to an enclosed disk that is one-half clear and one-half black. There is a light above and a photodiode below the disk. The photodiode produces a 3V signal when exposed to light and a 0V signal when not exposed. (a) Sketch the relative appearance of voltage waveforms if (1) the wind is calm, (2) when the wind is 10 mph, and (3) when the wind is 100 mph. (b) Explain what information the microcomputer must have and tasks it must perform to convert the voltage waveforms into binary numbers representing wind speed in miles per hour.',
8
+ shortAnswer: 'Wind speed creates frequency changes in voltage signal: Calm=DC, 10mph=low frequency, 100mph=high frequency. Microcomputer counts transitions, calculates frequency, applies calibration formula, converts to binary.',
9
+ },
10
+ {
11
+ id: '1-2',
12
+ category: 'Temperature Conversion',
13
+ title: 'Discrete Quantized Voltage & Binary Code for Temperatures',
14
+ question: 'Using the scheme in Example 1-1, find the discrete, quantized value of voltage and the binary code for each of the following Fahrenheit temperatures: -34, +31, +77, and +108.',
15
+ shortAnswer: '-34°F: 0.6V → 10 → 00001010₂ | +31°F: 7.1V → 121 → 01111001₂ | +77°F: 11.7V → 199 → 11000111₂ | +108°F: 14.8V → 252 → 11111100₂',
16
+ },
17
+ {
18
+ id: '1-3',
19
+ category: 'Number Systems',
20
+ title: 'Binary, Octal, and Hexadecimal Representation (16-31)',
21
+ question: 'List the binary, octal, and hexadecimal numbers from 16 to 31.',
22
+ shortAnswer: '16: 10000₂, 20₈, 10₁₆ through 31: 11111₂, 37₈, 1F₁₆',
23
+ },
24
+ {
25
+ id: '1-4',
26
+ category: 'Memory Bits',
27
+ title: 'Exact Number of Bits in Memory',
28
+ question: 'What is the exact number of bits in a memory that contains (a) 128K bits; (b) 32M bits?',
29
+ shortAnswer: '(a) 128K = 2¹⁷ = 131,072 bits | (b) 32M = 2²⁵ = 33,554,432 bits',
30
+ },
31
+ {
32
+ id: '1-5',
33
+ category: 'Memory Calculation',
34
+ title: 'Number of Bits in 1 Terabyte',
35
+ question: 'How many bits are in 1 TB?',
36
+ shortAnswer: '1 TB = 2⁴³ bits = 8,796,093,022,208 bits (≈8.8 trillion bits)',
37
+ },
38
+ {
39
+ id: '1-6',
40
+ category: 'Binary to Decimal',
41
+ title: 'Largest Binary Integer in N Bits',
42
+ question: 'What is the decimal equivalent of the largest binary integer that can be obtained with (a) 11 bits and (b) 25 bits?',
43
+ shortAnswer: '(a) 11 bits: 2¹¹ - 1 = 2,047 | (b) 25 bits: 2²⁵ - 1 = 33,554,431',
44
+ },
45
+ {
46
+ id: '1-7',
47
+ category: 'Binary to Decimal',
48
+ title: 'Convert Binary to Decimal',
49
+ question: 'Convert the following binary numbers to decimal: 1001101, 101001.101, and 10101110.1001.',
50
+ shortAnswer: '1001101₂ = 77₁₀ | 101001.101₂ = 41.625₁₀ | 10101110.1001₂ = 174.5625₁₀',
51
+ },
52
+ {
53
+ id: '1-8',
54
+ category: 'Decimal to Binary',
55
+ title: 'Convert Decimal to Binary',
56
+ question: 'Convert the following decimal numbers to binary: 187, 891, 2014, and 20486.',
57
+ shortAnswer: '187₁₀ = 10111011₂ | 891₁₀ = 1101111011₂ | 2014₁₀ = 11111011110₂ | 20486₁₀ = 100111111111110₂',
58
+ },
59
+ {
60
+ id: '1-9',
61
+ category: 'Base Conversion',
62
+ title: 'Complete Number System Conversion Table',
63
+ question: 'Convert numbers from given base to other three bases: Decimal 369.3125, Binary 101111101.101, Octal 326.5, Hexadecimal F3C7A',
64
+ shortAnswer: '369.3125₁₀ = 101110001.0101₂ = 561.24₈ = 171.5₁₆ | 101111101.101₂ = 381.625₁₀ = 575.5₈ = 17D.A₁₆ | 326.5₈ = 214.625₁₀ = 011010110.101₂ = D6.A₁₆ | F3C7A₁₆ = 998522₁₀ = 11110011110001111010₂ = 3636172₈',
65
+ },
66
+ {
67
+ id: '1-10',
68
+ category: 'Base Conversion',
69
+ title: 'Decimal to Other Bases Using Subtraction Method',
70
+ question: 'Convert: (a) 7562.45 to octal, (b) 1938.257 to hexadecimal, (c) 175.175 to binary.',
71
+ shortAnswer: '(a) 7562.45₁₀ = 16612.3463₈ | (b) 1938.257₁₀ = 792.41CA₁₆ | (c) 175.175₁₀ = 10101111.0010110₂',
72
+ },
73
+ {
74
+ id: '1-11',
75
+ category: 'Base Conversion',
76
+ title: 'Base 2 as Intermediate for Conversions',
77
+ question: 'Perform conversions using base 2 as intermediate: (a) (673.6)₈ to hex, (b) (E7C.B)₁₆ to octal, (c) (310.2)₄ to octal.',
78
+ shortAnswer: '(a) 673.6₈ → 110111011.110₂ → 1BB.C₁₆ | (b) E7C.B₁₆ → 111001111100.1011₂ → 7174.54₈ | (c) 310.2₄ → 110100.10₂ → 64.4₈',
79
+ },
80
+ {
81
+ id: '1-12',
82
+ category: 'Binary Arithmetic',
83
+ title: 'Binary Multiplication',
84
+ question: 'Perform: (a) 1010 × 1100, (b) 0110 × 1001, (c) 1111001 × 0110101.',
85
+ shortAnswer: '(a) 1010 × 1100 = 1111000₂ (120₁₀) | (b) 0110 × 1001 = 110110₂ (54₁₀) | (c) 1111001 × 0110101 = 1100011110101₂ (6413₁₀)',
86
+ },
87
+ {
88
+ id: '1-13',
89
+ category: 'Binary Division',
90
+ title: 'Binary Division with Quotient and Remainder',
91
+ question: 'Perform binary division 1010110 ÷ 101 to obtain quotient and remainder.',
92
+ shortAnswer: '1010110₂ ÷ 101₂ = 10001₂ remainder 1₂ | Verification: 86₁₀ ÷ 5₁₀ = 17 remainder 1',
93
+ },
94
+ {
95
+ id: '1-14',
96
+ category: 'Weighted Number Systems',
97
+ title: 'Base 12 System with Special Weights (Dozen/Gross)',
98
+ question: 'Base 12 system: 12³=great gross, 12²=gross, 12=dozen. (a) How many cans in 6 gross 5 dozen and 4? (b) Represent 7569₁₀ cans in base 12.',
99
+ shortAnswer: '(a) 6×144 + 5×12 + 4 = 928 cans | (b) 7569₁₀ = 4469₁₂',
100
+ },
101
+ {
102
+ id: '1-15',
103
+ category: 'Base 20 Number System',
104
+ title: 'Historical Base 20 System and Conversion',
105
+ question: 'Base 20 system: (a) Write digits 0-19, (b) Convert 2014₁₀ to base 20, (c) Convert (BC1)₂₀ to decimal.',
106
+ shortAnswer: '(a) 0-9, A-J | (b) 2014₁₀ = 50E₂₀ | (c) BC1₂₀ = 4641₁₀',
107
+ },
108
+ {
109
+ id: '1-16',
110
+ category: 'Radix Calculation',
111
+ title: 'Determining the Radix from Representations',
112
+ question: 'Determine radix r: (a) (BEE)ᵣ = (2699)₁₀, (b) (365)ᵣ = (194)₁₀.',
113
+ shortAnswer: '(a) r = 15 | (b) r = 7',
114
+ },
115
+ {
116
+ id: '1-17',
117
+ category: 'Custom Radix Problem',
118
+ title: 'Chicken Intelligence: Multi-Base Calculation',
119
+ question: 'If ((34)ᵣ + (24)ᵣ) × (21)ᵣ = (1480)ᵣ and r = total toes, how many toes per foot?',
120
+ shortAnswer: '3 toes per foot (r = 6 total toes)',
121
+ },
122
+ {
123
+ id: '1-18',
124
+ category: 'BCD Conversion',
125
+ title: 'Binary Representations of BCD Numbers',
126
+ question: 'Find binary for BCD: (a) 0100 1000 0110 0111, (b) 0011 0111 1000.0111 0101.',
127
+ shortAnswer: '(a) 4867₁₀ = 1001100000011₂ | (b) 378.75₁₀ = 101111010.11₂',
128
+ },
129
+ {
130
+ id: '1-19',
131
+ category: 'Decimal to BCD',
132
+ title: 'Represent Decimal Numbers in BCD',
133
+ question: 'Represent in BCD: 715 and 354.',
134
+ shortAnswer: '715₁₀ = 0111 0001 0101 BCD | 354₁₀ = 0011 0101 0100 BCD',
135
+ },
136
+ {
137
+ id: '1-20',
138
+ category: 'BCD to Binary Algorithm',
139
+ title: 'Convert BCD to Binary Using Shift Algorithm',
140
+ question: 'Execute algorithm for: (a) 0111 1000, (b) 0011 1001 0111.',
141
+ shortAnswer: '(a) 78₁₀ → 01001110₂ | (b) 397₁₀ → 110001101₂',
142
+ },
143
+ {
144
+ id: '1-21',
145
+ category: 'Binary to BCD Algorithm',
146
+ title: 'Convert Binary to BCD Using Shift-Left Algorithm',
147
+ question: 'Execute for: (a) 1111000, (b) 01110010111.',
148
+ shortAnswer: '(a) 120₁₀ → 0001 0010 0000 BCD | (b) 919₁₀ → 1001 0001 1001 BCD',
149
+ },
150
+ {
151
+ id: '1-22',
152
+ category: 'ASCII Encoding',
153
+ title: 'ASCII Case Conversion - Bit Manipulation',
154
+ question: 'What bit position must be complemented to change ASCII letter from uppercase to lowercase and vice versa?',
155
+ shortAnswer: 'Bit position 5 (2⁵ = 32). Toggle with XOR 0x20 or 00100000₂',
156
+ },
157
+ {
158
+ id: '1-23',
159
+ category: 'ASCII Parity',
160
+ title: 'ASCII Character Names with Parity Bits',
161
+ question: 'Write your full name in ASCII with (a) even parity and (b) odd parity in leftmost bit.',
162
+ shortAnswer: 'Add parity bit to make total 1s even (even parity) or odd (odd parity). Example: J=01001010 → 11001010 (even) or 01001010 (odd)',
163
+ },
164
+ {
165
+ id: '1-24',
166
+ category: 'ASCII Decoding',
167
+ title: 'Decode ASCII Binary Sequence',
168
+ question: 'Decode: 1000111 1101111 0100000 1000011 1100001 1110100 1110011 0100001',
169
+ shortAnswer: '"Go Cats!" (G=71, o=111, space=32, C=67, a=97, t=116, s=115, !=33)',
170
+ },
171
+ {
172
+ id: '1-25',
173
+ category: 'Number Representation',
174
+ title: 'Multiple Representations of Decimal 255',
175
+ question: 'Show 255 in: (a) binary, (b) BCD, (c) ASCII, (d) ASCII with odd parity.',
176
+ shortAnswer: '(a) 11111111₂ | (b) 0010 0101 0101 BCD | (c) 0110010 0110101 0110101 ASCII | (d) 00110010 10110101 10110101 ASCII-odd',
177
+ },
178
+ {
179
+ id: '1-26',
180
+ category: 'Unicode & Extended ASCII',
181
+ title: 'Encode International Names in Unicode',
182
+ question: 'Encode names using: (a) U+0040, (b) U+00A2, (c) U+20AC, (d) U+1F6B2.',
183
+ shortAnswer: '(a) @ | (b) ¢ | (c) € | (d) 🚲',
184
+ },
185
+ {
186
+ id: '1-27',
187
+ category: 'Gray Code',
188
+ title: 'Generate Gray Code Sequence with Parity',
189
+ question: 'List 7-bit Gray code for 32-47 with odd parity bit in rightmost position.',
190
+ shortAnswer: '32: 1100001, 33: 1100010, 34: 1100111, ... (Gray code ensures only 1 bit changes between consecutive numbers)',
191
+ },
192
+ {
193
+ id: '1-28',
194
+ category: 'Gray Code',
195
+ title: 'Find Hexadecimal Gray Code Value',
196
+ question: 'Using Section 1-7 procedure, find the hexadecimal Gray code.',
197
+ shortAnswer: 'Hex Gray: 0, 1, 3, 2, 6, 7, 5, 4, C, D, F, E, A, B, 9, 8',
198
+ },
199
+ {
200
+ id: '1-29',
201
+ category: 'Gray Code Application',
202
+ title: 'Wind Direction Encoding with Gray Code',
203
+ question: 'Wind direction disk encoder with 000=N. List Gray codes for S, E, W, NW, NE, SE, SW. Why is Gray better than binary?',
204
+ shortAnswer: 'N=000, NE=001, E=011, SE=010, S=110, SW=111, W=101, NW=100. Gray prevents large errors: only 1 bit changes per step.',
205
+ },
206
+ {
207
+ id: '1-30',
208
+ category: 'Power Analysis',
209
+ title: 'Power Consumption: Binary vs Gray Code Counter',
210
+ question: 'What percentage of power does Gray code counter consume vs binary counter for continuous counting?',
211
+ shortAnswer: 'Gray ≈ (1 + 1/2ⁿ) × 100% of binary. For n=8: 100.4%. Gray uses slightly more power but reduces errors.',
212
+ },
213
+ ],
214
+ Ch2: [
215
+ {
216
+ id: '2-1',
217
+ category: 'Truth Tables & Boolean Identities',
218
+ title: 'Demonstrate by Truth Tables',
219
+ question: '(a) DeMorgan\'s theorem for three variables: (XYZ)\' = X\' + Y\' + Z\' | (b) The second distributive law: X + YZ = (X + Y)(X + Z) | (c) XY\' + Y\'Z + XZ\' = XY\' + Y\'Z + X\'Z',
220
+ shortAnswer: '(a) Both sides equal for all 8 combinations | (b) Both sides produce identical truth tables | (c) Both expressions have same truth table output',
221
+ },
222
+ {
223
+ id: '2-2',
224
+ category: 'Algebraic Manipulation',
225
+ title: 'Prove Boolean Identities Algebraically',
226
+ question: '(a) X\'Y\' + X\'Y + XY = X\' + Y | (b) A\'B + B\'C\' + AB + B\'C = 1 | (c) Y + X\'Z + XY\' = X + Y + Z | (d) X\'Y\' + Y\'Z + XZ + XY + YZ\' = X\'Y\' + XZ + YZ\'',
227
+ shortAnswer: '(a) X\'(Y\'+Y) + XY = X\' + XY = X\' + Y | (b) B\'(C\'+C) + B(A\'+A) = B\' + B = 1 | (c) Y(1+X\') + X\'Z = Y + X\' + Z = X + Y + Z | (d) Consensus theorem application',
228
+ },
229
+ {
230
+ id: '2-3',
231
+ category: 'Algebraic Manipulation',
232
+ title: 'Prove Boolean Identities (Advanced)',
233
+ question: '(a) AB\'C\' + BC\'D\' + BC + C\'D = B + C\'D | (b) WY + W\'YZ\' + WXZ + W\'XY\' = WY + W\'XZ\' + XY\'Z\' + XY\'Z | (c) AD\' + A\'B + C\'D + B\'C = (A\'+B\'+C\'+D\')(A+B+C+D)',
234
+ shortAnswer: '(a) BC(1+D\') + AB\'C\' + C\'D = BC + C\'(AB\'+D) = B + C\'D | (b) Consensus and absorption theorems | (c) Dual relationship proof',
235
+ },
236
+ {
237
+ id: '2-4',
238
+ category: 'Conditional Proof',
239
+ title: 'Prove Given A·B=0 and A+B=1',
240
+ question: 'Given that A·B = 0 and A+B = 1, use algebraic manipulation to prove that (A+C)(A\'+B)(B+C) = B·C',
241
+ shortAnswer: 'Since A·B=0 and A+B=1, A and B are complements (B=A\'). Substituting: (A+C)(A\'+A\')(A\'+C) = (A+C)(0)(A\'+C) = ... Wait, let me redo: (A+C)(A\'+B)(B+C) with B=A\' gives (A+C)(A\'+A\')(A\'+C) = (A+C)(1)(A\'+C) = AA\' + AC + A\'C + CC = 0 + C(A+A\') + C = C = B\'C since B=A\'',
242
+ },
243
+ {
244
+ id: '2-5',
245
+ category: 'Boolean Algebra with Binary Strings',
246
+ title: 'Four-Bit Nibble Boolean Algebra',
247
+ question: 'Define for 4-bit nibbles (16 elements): (a) OR operation A+B | (b) AND operation A·B | (c) Element 0 | (d) Element 1 | (e) Complement A\'',
248
+ shortAnswer: '(a) Bitwise OR: 1010 + 1100 = 1110 | (b) Bitwise AND: 1010 · 1100 = 1000 | (c) 0000 | (d) 1111 | (e) Bitwise NOT: (1010)\' = 0101',
249
+ },
250
+ {
251
+ id: '2-6',
252
+ category: 'Expression Simplification',
253
+ title: 'Simplify to Minimum Literals',
254
+ question: '(a) A\'C\' + A\'BC + B\'C | (b) (A\'+B\'+C\')·A\'B\'C\' | (c) ABC\' + AC | (d) A\'BD + A\'CD\' + BD | (e) (A+B)(A+C)(AB\'C\')',
255
+ shortAnswer: '(a) A\'C\' + B\'C | (b) A\'B\'C\' | (c) AC | (d) BD + A\'CD\' | (e) AB\'C\'',
256
+ },
257
+ {
258
+ id: '2-7',
259
+ category: 'Literal Reduction',
260
+ title: 'Reduce to Indicated Literals',
261
+ question: '(a) X\'Y + XYZ + X\'Y to three literals | (b) X + Y(Z + X\' + Z\') to two literals | (c) W\'X(Z\' + Y\'Z) + X(W + W\'YZ) to one literal | (d) (AB+A\'B\')(C\'D\'+CD)+A\'C to four literals',
262
+ shortAnswer: '(a) Y(X\'+XZ+X\') = Y(X\'+XZ) = X\'Y + XYZ = Y(X\'+XZ) → X\'Y + YZ = Y(X\'+Z) | (b) X + Y(1) = X + Y | (c) X | (d) A\'B\' + AB + A\'C',
263
+ },
264
+ {
265
+ id: '2-8',
266
+ category: 'DeMorgan\'s Theorem',
267
+ title: 'Express Using Only Specified Operations',
268
+ question: 'F = AB\'C + A\'C\' + AB. Express: (a) with only OR and complement | (b) with only AND and complement | (c) with only NAND and complement',
269
+ shortAnswer: '(a) (A\'+B+C\')\'(A+C)\'(A\'+B\')\' using DeMorgan then OR | (b) Double complement of OR form | (c) NAND is universal, implement using NAND gates only',
270
+ },
271
+ {
272
+ id: '2-9',
273
+ category: 'Complement Finding',
274
+ title: 'Find the Complement of Expressions',
275
+ question: '(a) AB\' + A\'B | (b) (V\'W + X)Y + Z\' | (c) WX(Y\'Z + YZ\') + W\'X(Y\'+Z)(Y+Z\') | (d) (A+B\'+C)(A\'B\'+C)(A+B\'C\')',
276
+ shortAnswer: '(a) (A\'+B)(A+B\') = A\'B\' + AB | (b) ((V+W\')X\'+Y\')Z | (c) Apply DeMorgan\'s systematically | (d) A\'BC\' + AB + A\'BC',
277
+ },
278
+ {
279
+ id: '2-10',
280
+ category: 'Truth Tables & Standard Forms',
281
+ title: 'Truth Table to Minterms and Maxterms',
282
+ question: 'Obtain truth table and express in sum-of-minterms and product-of-maxterms: (a) (XY+Z)(Y+XZ) | (b) (A\'+B)(B\'+C) | (c) WXY\' + WX\'Z\' + WXZ + YZ\'',
283
+ shortAnswer: '(a) Build truth table, identify where F=1 for minterms, F=0 for maxterms | (b) Expand and identify minterms/maxterms | (c) 4-variable truth table analysis',
284
+ },
285
+ {
286
+ id: '2-11',
287
+ category: 'Truth Table Analysis',
288
+ title: 'Analyze Functions E and F from Truth Table',
289
+ question: 'Given truth table with X,Y,Z inputs and E,F outputs: (a) List minterms and maxterms of each | (b) List minterms of E\' and F\' | (c) List minterms of E+F and E·F | (d) Express in sum-of-minterms | (e) Simplify to minimum literals',
290
+ shortAnswer: 'E = Σm(1,2,4,6), F = Σm(0,2,4,7) | E\' = Σm(0,3,5,7), F\' = Σm(1,3,5,6) | E+F = Σm(0,1,2,4,6,7), E·F = Σm(2,4) | E = X\'Y\'Z + X\'YZ\' + XY\'Z\' + XYZ\', F = ... | Simplify using K-maps',
291
+ },
292
+ {
293
+ id: '2-12',
294
+ category: 'SOP and POS Conversion',
295
+ title: 'Convert to Sum-of-Products and Product-of-Sums',
296
+ question: '(a) (AB+C)(B+C\'D) | (b) X\' + X(X\'+Y\')(Y+Z\') | (c) (A+BC\'+CD)(B\'+EF)',
297
+ shortAnswer: '(a) SOP: AB + BC\'D + CB + CC\'D = AB + BC\'D + BC | POS: Keep factored form | (b) SOP: X\' + XY\'Z\' | (c) Expand using distributive law',
298
+ },
299
+ {
300
+ id: '2-13',
301
+ category: 'Logic Diagrams',
302
+ title: 'Draw Logic Diagrams (No Complements Available)',
303
+ question: 'Draw logic diagrams (complements NOT available): (a) A\'B\'C\' + AB + AC | (b) X(YZ\'+Y\'Z) + W\'(Y\'+X\'Z) | (c) AC(B\'+D) + A\'C(B\'+D\') + BC(A\'+D\')',
304
+ shortAnswer: '(a) Need inverters for A\',B\',C\', then AND-OR structure | (b) Complex multi-level with XOR-like structures | (c) Multi-level with multiple AND-OR stages',
305
+ },
306
+ {
307
+ id: '2-14',
308
+ category: '3-Variable K-Map Optimization',
309
+ title: 'Optimize Using 3-Variable K-Map',
310
+ question: '(a) F(X,Y,Z) = Σm(2,3,4,7) | (b) F(X,Y,Z) = Σm(0,4,5,6) | (c) F(A,B,C) = Σm(0,2,4,6,7) | (d) F(A,B,C) = Σm(0,1,3,4,6,7)',
311
+ shortAnswer: '(a) X\'Y + YZ | (b) X\'Y\'Z\' + XY\' + XZ\' | (c) C\' + AB | (d) A\'B\' + C\' + AB',
312
+ },
313
+ {
314
+ id: '2-15',
315
+ category: '3-Variable K-Map Optimization',
316
+ title: 'Optimize Boolean Expressions Using K-Map',
317
+ question: '(a) X\'Z\' + YZ\' + XYZ | (b) A\'B + B\'C + A\'B\'C\' | (c) A\'B\' + AC\' + B\'C + AB\'C\'',
318
+ shortAnswer: '(a) Z\'(X\'+Y) + XYZ = X\'Z\' + YZ\' + XYZ → Group: Z\'(X\'+Y) + XYZ | (b) A\'B + B\'C + A\'C\' | (c) B\' + AC\'',
319
+ },
320
+ {
321
+ id: '2-16',
322
+ category: '4-Variable K-Map Optimization',
323
+ title: 'Optimize Using 4-Variable K-Map',
324
+ question: '(a) F(A,B,C,D) = Σm(0,2,4,5,8,10,11,15) | (b) F(A,B,C,D) = Σm(0,1,2,4,5,6,10,11) | (c) F(W,X,Y,Z) = Σm(0,2,4,7,8,10,12,13)',
325
+ shortAnswer: '(a) B\'D\' + A\'BD\' + AB\'C + ACD | (b) C\'D\' + B\'D\' + A\'C\' + A\'BD\' | (c) Z\'Y\' + W\'XZ\' + WXY\' + WXZ',
326
+ },
327
+ {
328
+ id: '2-17',
329
+ category: '4-Variable K-Map Optimization',
330
+ title: 'Optimize Boolean Functions Using K-Map',
331
+ question: '(a) F(W,X,Y,Z) = Σm(0,1,2,4,7,8,10,12) | (b) F(A,B,C,D) = Σm(1,4,5,6,10,11,12,13,15)',
332
+ shortAnswer: '(a) Y\'Z\' + W\'X\'Z\' + W\'XZ + XYZ | (b) A\'C\'D + BC\' + ABD + AB\'C',
333
+ },
334
+ {
335
+ id: '2-18',
336
+ category: 'Minterms from K-Map',
337
+ title: 'Find Minterms by Plotting on K-Map',
338
+ question: '(a) XY + XZ + X\'YZ | (b) XZ + W\'XY\' + WXY + W\'YZ + WY\'Z | (c) B\'D\' + ABD + A\'BC\'',
339
+ shortAnswer: '(a) Plot each term, identify all 1s: Σm(3,5,6,7) for 3 vars | (b) 4-variable: Σm(5,7,10,11,12,13,14,15) | (c) Σm(0,2,8,10,11,13,15)',
340
+ },
341
+ {
342
+ id: '2-19',
343
+ category: 'Prime Implicants',
344
+ title: 'Find All Prime Implicants and Essential Ones',
345
+ question: '(a) F(W,X,Y,Z) = Σm(0,2,5,7,8,10,12,13,14,15) | (b) F(A,B,C,D) = Σm(0,2,3,5,7,8,10,11,14,15) | (c) F(A,B,C,D) = Σm(1,3,4,5,9,10,11,12,13,14,15)',
346
+ shortAnswer: '(a) Prime: W\'XZ, WXZ\', W\'Y\'Z\', XY, XZ. Essential: W\'Y\'Z\', W\'XZ | (b) Find all groups of 1s, identify essential | (c) Systematic PI determination',
347
+ },
348
+ {
349
+ id: '2-20',
350
+ category: 'Prime Implicant Selection',
351
+ title: 'Optimize Using Prime Implicant Selection Rule',
352
+ question: '(a) F(A,B,C,D) = Σm(1,5,6,7,11,12,13,15) | (b) F(W,X,Y,Z) = Σm(0,1,2,3,4,5,10,11,13,15) | (c) F(W,X,Y,Z) = Σm(0,1,2,5,7,8,10,12,14,15)',
353
+ shortAnswer: '(a) Find all PIs, select essential, cover remaining with minimal PIs | (b) Systematic selection | (c) Petrick\'s method if needed',
354
+ },
355
+ {
356
+ id: '2-21',
357
+ category: 'Product-of-Sums Optimization',
358
+ title: 'Optimize in Product-of-Sums Form',
359
+ question: '(a) F(W,X,Y,Z) = Σm(0,1,2,8,10,12,14,15) | (b) F(A,B,C,D) = ΠM(0,2,6,7,8,9,10,12,14,15)',
360
+ shortAnswer: '(a) Find POS by grouping 0s: (W\'+X)(X\'+Z)(Y\'+Z\')(W+Y) | (b) Convert maxterms to POS form, group 0s',
361
+ },
362
+ {
363
+ id: '2-22',
364
+ category: 'SOP and POS Optimization',
365
+ title: 'Optimize in Both SOP and POS Forms',
366
+ question: '(a) AC\' + B\'D + A\'CD + AB\'CD | (b) (A\'+B\'+D\')(A+B\'+C\')(A\'+B+D\')(B+C\'+D\') | (c) (A\'+B\'+D)(A\'+D\')(A+B+D\')(A+B\'+C+D)',
367
+ shortAnswer: '(a) SOP: AC\' + B\'D + A\'CD, POS: (A+B\'+D)(A\'+C\'+D)(A\'+B\'+C) | (b) Expand and simplify | (c) Group terms',
368
+ },
369
+ {
370
+ id: '2-23',
371
+ category: 'SOP and POS Forms',
372
+ title: 'Optimize to SOP and POS',
373
+ question: '(a) F(A,B,C,D) = Σm(2,3,5,7,8,10,12,13) | (b) F(W,X,Y,Z) = ΠM(5,12,13,14)',
374
+ shortAnswer: '(a) SOP: C\'D + AB\'C\' + A\'BD, POS: (A+B+C)(A\'+C\'+D)(B\'+C+D\') | (b) SOP from maxterms complement',
375
+ },
376
+ {
377
+ id: '2-24',
378
+ category: 'Don\'t Care Conditions',
379
+ title: 'Optimize with Don\'t Care Conditions',
380
+ question: '(a) F(A,B,C) = Σm(2,4,7), d(A,B,C) = Σm(0,1,5,6) | (b) F(A,B,C,D) = Σm(2,5,6,13,15), d = Σm(0,4,8,10,11) | (c) F(W,X,Y,Z) = Σm(1,2,4,10,13), d = Σm(5,7,11,14)',
381
+ shortAnswer: '(a) Use d to expand groups: F = C + A\'B\' | (b) Treat d as 1s where helpful | (c) Optimal grouping with don\'t cares',
382
+ },
383
+ {
384
+ id: '2-25',
385
+ category: 'Prime Implicants with Don\'t Cares',
386
+ title: 'Find PIs and Essential PIs with Don\'t Cares',
387
+ question: '(a) F(A,B,C) = Σm(3,5,6), d(A,B,C) = Σm(0,7) | (b) [Additional problems with don\'t cares]',
388
+ shortAnswer: '(a) Include d in PI detection but not in coverage requirement | Essential PIs cover only minterms, not don\'t cares',
389
+ },
390
+ {
391
+ id: '2-26',
392
+ category: 'SOP and POS with Don\'t Cares',
393
+ title: 'Optimize in SOP and POS with Don\'t Care Conditions',
394
+ question: '(a) F(W,X,Y,Z) = Σm(5,6,11,12), d(W,X,Y,Z) = Σm(0,1,2,9,10,14,15) | (b) F(A,B,C,D) = ΠM(3,4,6,11,12,14), d(A,B,C,D) = Σm(0,1,2,7,8,9,10)',
395
+ shortAnswer: '(a) SOP: W\'X\' + XY\' + WX\'Y, POS: (W+X)(W\'+X\'+Y\')(W\'+X+Y) | (b) Use d to simplify both SOP and POS forms',
396
+ },
397
+ {
398
+ id: '2-27',
399
+ category: 'XOR Properties',
400
+ title: 'Prove Dual of XOR is its Complement',
401
+ question: 'Prove that the dual of the exclusive-OR is also its complement.',
402
+ shortAnswer: 'XOR: A⊕B = AB\' + A\'B. Dual: (A+B\')(A\'+B) = AA\' + AB + A\'B\' + B\'B = AB + A\'B\' = (A⊕B)\'. The dual equals the complement.',
403
+ },
404
+ {
405
+ id: '2-28',
406
+ category: 'Gate Implementation',
407
+ title: 'Implement with XOR and AND Gates (Minimum Inputs)',
408
+ question: 'Implement F(A,B,C,D) = ABC\'D + AD\' + A\'D using exclusive-OR and AND gates with minimum gate inputs.',
409
+ shortAnswer: 'F = A(BCD\' + D\') + A\'D = A(B+D\') + A\'D. Use XOR for A⊕D = AD\' + A\'D, AND gates for remaining terms. Total: 2 XOR, 2 AND, 8 inputs.',
410
+ },
411
+ {
412
+ id: '2-29',
413
+ category: 'Propagation Delay',
414
+ title: 'Calculate Longest Path Propagation Delay',
415
+ question: 'NOR gates have t_pd = 0.073 ns, inverter has t_pd = 0.048 ns. Find propagation delay of longest path through the circuit (Figure 2-39).',
416
+ shortAnswer: 'Longest path has 3 NOR gates + 1 inverter = 3(0.073) + 0.048 = 0.219 + 0.048 = 0.267 ns',
417
+ },
418
+ {
419
+ id: '2-30',
420
+ category: 'Inverter Waveform Analysis',
421
+ title: 'Inverter Output with Different Delay Models',
422
+ question: 'Waveform in Figure 2-40 applied to inverter. Find output: (a) no delay, (b) transport delay 0.06 ns, (c) inertial delay 0.06 ns with rejection time 0.04 ns.',
423
+ shortAnswer: '(a) Immediate inversion | (b) Output shifted by 0.06 ns | (c) Pulses < 0.04 ns rejected, output delayed by 0.06 ns',
424
+ },
425
+ {
426
+ id: '2-31',
427
+ category: 'Gate Delay Analysis',
428
+ title: 'Find Delay from Each Input to Output',
429
+ question: 'In Figure 2-41: (a) Find t_PHL and t_PLH for each path with t_PHL=0.20ns, t_PLH=0.36ns per gate | (b) Using t_pd=0.28ns per gate | (c) Compare and discuss differences.',
430
+ shortAnswer: '(a) Calculate for each path through gates | (b) Simpler calculation with average | (c) Average method approximates asymmetric delays',
431
+ },
432
+ {
433
+ id: '2-32',
434
+ category: 'Inertial Delay',
435
+ title: 'Rejection Time Condition for Inertial Delays',
436
+ question: 'Why must rejection time for inertial delays be ≤ propagation delay to determine delayed output?',
437
+ shortAnswer: 'If rejection time > propagation delay, valid transitions could be filtered out. The condition ensures only glitches shorter than the gate\'s response time are rejected.',
438
+ },
439
+ {
440
+ id: '2-33',
441
+ category: 'Inertial Delay Model',
442
+ title: 'Develop Inertial Delay Model from Gate Parameters',
443
+ question: 'Given t_PHL=0.05ns, t_PLH=0.10ns. (a) For positive pulse (LHL), find propagation delay and rejection time | (b) Discuss applicability for negative pulse (HLH).',
444
+ shortAnswer: '(a) t_pd = (0.05+0.10)/2 = 0.075ns, rejection time typically = min(t_PHL,t_PLH) = 0.05ns | (b) Asymmetric delays affect pulse width differently',
445
+ },
446
+ {
447
+ id: '2-34',
448
+ category: 'VHDL Structural Description',
449
+ title: 'Logic Diagram from VHDL Structural Description',
450
+ question: 'Find logic diagram corresponding to VHDL structural description in Figure 2-42. Complemented inputs not available.',
451
+ shortAnswer: 'Analyze VHDL code: NOT gates for complements, AND gates for products, OR gate for final sum. Draw equivalent gate-level diagram with inverters.',
452
+ },
453
+ {
454
+ id: '2-35',
455
+ category: 'VHDL Structural Description',
456
+ title: 'Write Structural VHDL for Circuit',
457
+ question: 'Using Figure 2-28 framework, write structural VHDL for circuit in Figure 2-43. Replace X,Y,Z with X(2:0). Consult func_prims package.',
458
+ shortAnswer: 'Define entity with X input vector, instantiate NAND gates from func_prims, connect signals according to Figure 2-43 logic diagram.',
459
+ },
460
+ {
461
+ id: '2-36',
462
+ category: 'VHDL Structural Description',
463
+ title: 'Structural VHDL for Circuit in Figure 2-44',
464
+ question: 'Write structural VHDL description for circuit in Figure 2-44 using func_prims package. Compile and simulate for all 16 input combinations.',
465
+ shortAnswer: 'Identify gate types in Figure 2-44, declare component instances, map ports to signals, verify with testbench covering all 4-input combinations.',
466
+ },
467
+ {
468
+ id: '2-37',
469
+ category: 'VHDL Dataflow to Logic',
470
+ title: 'Minimum Two-Level Logic from VHDL Dataflow',
471
+ question: 'Find logic diagram representing minimum two-level logic for VHDL dataflow in Figure 2-45. Complemented inputs available.',
472
+ shortAnswer: 'Analyze dataflow VHDL: f <= b and (a or (a_n and c)) or (b_n and c and d_n). Simplify Boolean expression, implement with AND-OR two-level logic.',
473
+ },
474
+ {
475
+ id: '2-38',
476
+ category: 'VHDL Dataflow Description',
477
+ title: 'Dataflow VHDL for Circuit in Figure 2-43',
478
+ question: 'Write dataflow VHDL description for circuit in Figure 2-43 using Boolean equation for output F.',
479
+ shortAnswer: 'Derive F from Figure 2-43 gate connections. Write concurrent signal assignments: F <= (X and Y) nand (Y nand Z) etc., using dataflow style.',
480
+ },
481
+ {
482
+ id: '2-39',
483
+ category: 'Verilog Structural Description',
484
+ title: 'Logic Diagram from Verilog Structural Description',
485
+ question: 'Find logic diagram corresponding to Verilog structural description in Figure 2-46. Complemented inputs not available.',
486
+ shortAnswer: 'Parse Verilog module: NOT gates (g0,g1), AND gates (g2-g5), OR gate (g6). Draw diagram showing x1-x4 inputs, intermediate signals n1-n6, output f.',
487
+ },
488
+ {
489
+ id: '2-40',
490
+ category: 'Verilog Structural Description',
491
+ title: 'Structural Verilog for Circuit in Figure 2-44',
492
+ question: 'Using Figure 2-33 framework, write structural Verilog for circuit in Figure 2-44. Compile and simulate for all 16 input combinations.',
493
+ shortAnswer: 'Define module with 4 inputs, declare wire signals, instantiate NOT, AND, OR gates using gate primitives, connect according to Figure 2-44.',
494
+ },
495
+ {
496
+ id: '2-41',
497
+ category: 'Verilog Structural Description',
498
+ title: 'Structural Verilog for Circuit in Figure 2-43',
499
+ question: 'Using Figure 2-46 framework, write structural Verilog for circuit in Figure 2-43. Replace X,Y,Z with input [2:0] X.',
500
+ shortAnswer: 'Module with input [2:0] X, output F. Instantiate NAND gates: nand g1(n1, X[2], X[1]), etc. Connect intermediate signals to final output F.',
501
+ },
502
+ ]
503
+ }
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "dld-books",
3
+ "version": "1.0.0",
4
+ "description": "A community-driven JavaScript dataset of solved Digital Logic Design questions",
5
+ "main": "dld-books-solutions.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/SENODROOM/Digital-Logic-Design-Books.git"
12
+ },
13
+ "keywords": [],
14
+ "author": "",
15
+ "license": "ISC",
16
+ "bugs": {
17
+ "url": "https://github.com/SENODROOM/Digital-Logic-Design-Books/issues"
18
+ },
19
+ "homepage": "https://github.com/SENODROOM/Digital-Logic-Design-Books#readme"
20
+ }