Advanced Computer Number System Theory (कंप्यूटर संख्या प्रणाली)
Computer Number System Notes,
Binary Number System,
Decimal, Octal, Hexadecimal,
Computer Fundamentals, Computer GK Hindi,
Rajasthan Computer Teacher, SSC Computer Notes
A computer number system is a method of representing numbers in a computer system architecture. Every value that you are saving into or getting from computer memory has a defined number system. The base or radix of a number system determines the total number of unique digits used in that system.
Introduction / परिचय
English: A number system is a method of representing numbers using a specific base or radix.
Computers use number systems to store, process, and transmit data. The most important number systems in computing are Binary (Base-2), Octal (Base-8), Decimal (Base-10), and Hexadecimal (Base-16).
Hindi: संख्या पद्धति (Number System) संख्याओं को दर्शाने की एक विधि है जिसमें एक निश्चित आधार (Base या Radix) होता है।
कंप्यूटर डेटा को संग्रहित, संसाधित और संचारित करने के लिए विभिन्न संख्या पद्धतियों का उपयोग करता है। मुख्य संख्या पद्धतियाँ हैं: बाइनरी (Base-2), ऑक्टल (Base-8), दशमलव (Base-10) और हेक्साडेसिमल (Base-16)।
हिंदी में: कंप्यूटर नंबर सिस्टम (Computer Number System) कंप्यूटर आर्किटेक्चर में संख्याओं को दर्शाने का एक तरीका है। कंप्यूटर मेमोरी में आप जो भी डेटा सेव करते हैं या प्राप्त करते हैं, वह एक निश्चित नंबर सिस्टम पर आधारित होता है। किसी भी नंबर सिस्टम का 'Base' या 'Radix' यह तय करता है कि उस सिस्टम में कुल कितने अलग-अलग अंकों (digits) का उपयोग किया जाएगा।
What is Base (Radix)? / आधार क्या है?
English: The base or radix of a number system indicates how many unique digits including zero are used in that system.
• Binary → Base 2 (0,1)
• Octal → Base 8 (0–7)
• Decimal → Base 10 (0–9)
• Hexadecimal → Base 16 (0–9, A–F)
Hindi: किसी संख्या पद्धति का आधार यह बताता है कि उसमें कितने अलग-अलग अंक प्रयोग किए जाते हैं।
1. Types of Number Systems (नंबर सिस्टम के प्रकार)
| Number System | Base (Radix) | Valid Digits / Symbols |
|---|---|---|
| Binary (बाइनरी) | 2 | 0, 1 |
| Octal (ऑक्टल) | 8 | 0, 1, 2, 3, 4, 5, 6, 7 |
| Decimal (डेसिमल) | 10 | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 |
| Hexadecimal (हेक्साडेसिमल) | 16 | 0-9 and A-F (A=10, B=11, C=12, D=13, E=14, F=15) |
A. Decimal Number System (डेसिमल नंबर सिस्टम)
The decimal number system is the standard system for denoting integer and non-integer numbers. It uses 10 symbols (0-9). The position of every digit has a weight which is a power of 10.
हिंदी: डेसिमल नंबर सिस्टम वह सामान्य प्रणाली है जिसका उपयोग हम अपने दैनिक जीवन में करते हैं। इसका बेस 10 होता है और इसमें 0 से 9 तक के अंक होते हैं। इसमें प्रत्येक अंक का स्थानीय मान (place value) 10 की घात (power) में होता है।
B. Binary Number System (बाइनरी नंबर सिस्टम)
Computers use the binary number system to process data. It consists of only two digits: 0 (Low/Off) and 1 (High/On). Each binary digit is called a "bit".
हिंदी: कंप्यूटर डेटा को प्रोसेस करने के लिए बाइनरी नंबर सिस्टम का उपयोग करते हैं। इसमें केवल दो अंक होते हैं: 0 (Off) और 1 (On)। प्रत्येक बाइनरी अंक को "बिट" (Bit) कहा जाता है।
C. Octal Number System (ऑक्टल नंबर सिस्टम)
The octal numeral system has a base of 8, using digits from 0 to 7. It is often used in computing to represent binary numbers more compactly, grouping bits into sets of three.
हिंदी: ऑक्टल नंबर सिस्टम का बेस 8 होता है और इसमें 0 से 7 तक के अंक होते हैं। इसका उपयोग मुख्य रूप से बाइनरी संख्याओं को छोटे रूप में (3 बिट्स के समूह में) दर्शाने के लिए किया जाता है।
D. Hexadecimal Number System (हेक्साडेसिमल नंबर सिस्टम)
Base 16 system. Uses 0-9 for values zero to nine, and letters A, B, C, D, E, F to represent values ten to fifteen. Widely used in memory addressing and color codes (like HTML/CSS hex codes) because it groups 4 binary bits into a single character.
हिंदी: इसका बेस 16 होता है। इसमें 0 से 9 तक के अंक और A से F तक के अक्षर (A=10, B=11... F=15) इस्तेमाल होते हैं। यह 4 बाइनरी बिट्स को एक साथ जोड़ता है। मेमोरी एड्रेस और माइक्रोप्रोसेसर प्रोग्रामिंग में इसका बहुत उपयोग होता है।
2. Number System Conversions (नंबर सिस्टम रूपांतरण)
Converting numbers from one base to another is a critical skill for computer science exams. We will cover integral and fractional part conversions.
हिंदी: एक बेस से दूसरे बेस में संख्याओं को बदलना कंप्यूटर विज्ञान की परीक्षाओं के लिए एक बहुत ही महत्वपूर्ण विषय है। हम पूर्णांक (Integer) और दशमलव (Fraction) दोनों भागों का रूपांतरण सीखेंगे।
Type 1: Decimal to Any Base (डेसिमल से अन्य बेस में)
Rule: To convert a decimal integer to any base, use the "Repeated Division Method". Divide the decimal number by the target base and record the remainders from bottom to top. For fractional parts, use the "Repeated Multiplication Method" and record the integer parts from top to bottom.
नियम: डेसिमल पूर्णांक को किसी भी अन्य बेस में बदलने के लिए, संख्या को लक्ष्य बेस (target base) से बार-बार भाग दें और शेषफल (remainder) को नीचे से ऊपर की ओर लिखें। दशमलव वाले हिस्से (fractional part) के लिए, बेस से बार-बार गुणा करें और पूर्णांक वाले हिस्से को ऊपर से नीचे की ओर लिखें।
Example 1.1: Decimal to Binary (डेसिमल से बाइनरी)
Convert (25.375)10 to Binary.
25 / 2 = 12, Remainder = 1 (LSB - Least Significant Bit)
12 / 2 = 6, Remainder = 0
6 / 2 = 3, Remainder = 0
3 / 2 = 1, Remainder = 1
1 / 2 = 0, Remainder = 1 (MSB - Most Significant Bit)
Read bottom to top: (25)10 = (11001)2
Step 2: Fractional Part (0.375) - Repeated Multiplication by 2
0.375 × 2 = 0.750 => Integer part = 0
0.750 × 2 = 1.500 => Integer part = 1
0.500 × 2 = 1.000 => Integer part = 1
Read top to bottom: (0.375)10 = (.011)2
Final Answer: (25.375)10 = (11001.011)2
Example 1.2: Decimal to Octal (डेसिमल से ऑक्टल)
Convert (156)10 to Octal.
19 / 8 = 2, Remainder = 3
2 / 8 = 0, Remainder = 2
Read bottom to top.
Answer: (156)10 = (234)8
Example 1.3: Decimal to Hexadecimal (डेसिमल से हेक्साडेसिमल)
Convert (423)10 to Hexadecimal.
26 / 16 = 1, Remainder = 10 (In Hex, 10 is 'A')
1 / 16 = 0, Remainder = 1
Read bottom to top.
Answer: (423)10 = (1A7)16
Type 2: Any Base to Decimal (अन्य बेस से डेसिमल में)
Rule: Multiply each digit by its positional weight (base raised to the power of its position index). The index starts from 0 for the integer part (moving right to left) and -1 for the fractional part (moving left to right).
नियम: किसी भी बेस से डेसिमल में बदलने के लिए, प्रत्येक अंक को उसके स्थानीय मान (बेस की घात) से गुणा करें और सभी को जोड़ दें। पूर्णांक के लिए घात 0 से शुरू होकर बाईं ओर बढ़ती है, और दशमलव के लिए -1 से शुरू होकर दाईं ओर घटती है।
Example 2.1: Binary to Decimal
Convert (1011.101)2 to Decimal.
= (1 × 8) + 0 + (1 × 2) + (1 × 1) . (1 × 0.5) + 0 + (1 × 0.125)
= 8 + 0 + 2 + 1 + 0.5 + 0 + 0.125
Answer: (11.625)10
Example 2.2: Hexadecimal to Decimal
Convert (2B.C)16 to Decimal.
(2 × 161) + (11 × 160) . (12 × 16-1)
= 32 + 11 . (12 / 16)
= 43 + 0.75
Answer: (43.75)10
Type 3: Binary to Octal / Hexadecimal & Vice Versa
Rule: For Binary to Octal, group bits in sets of 3 (from the decimal point outwards). For Binary to Hexadecimal, group bits in sets of 4. Pad with leading/trailing zeros if necessary.
नियम: बाइनरी से ऑक्टल के लिए, दशमलव बिंदु से शुरू करते हुए 3-3 बिट्स के समूह बनाएं। बाइनरी से हेक्साडेसिमल के लिए 4-4 बिट्स के समूह बनाएं। यदि बिट्स कम पड़ें तो शून्य (0) लगा लें।
Example 3.1: Binary to Octal
Convert (1101011)2 to Octal.
Convert each group to decimal equivalent:
001 = 1
101 = 5
011 = 3
Answer: (153)8
Example 3.2: Hexadecimal to Binary
Convert (9F2)16 to Binary.
9 = 1001
F = 1111
2 = 0010
Answer: (100111110010)2
3. Binary Arithmetic (बाइनरी अंकगणित)
Binary arithmetic is essential for understanding how the ALU (Arithmetic Logic Unit) functions inside a computer's CPU.
हिंदी: कंप्यूटर के CPU में ALU (Arithmetic Logic Unit) कैसे काम करता है, यह समझने के लिए बाइनरी अंकगणित (Binary Arithmetic) को समझना बहुत जरूरी है।
A. Binary Addition (बाइनरी जोड़)
- 0 + 0 = 0
- 0 + 1 = 1
- 1 + 0 = 1
- 1 + 1 = 0 (with a carry of 1 to the next higher bit / हासिल 1)
- 1 + 1 + 1 = 1 (with a carry of 1)
1 1 1 1 (Carries)
1 0 1 1
+ 1 1 0 1
---------
1 1 0 0 0
Result: 11000
B. Binary Subtraction (बाइनरी घटाव)
- 0 - 0 = 0
- 1 - 0 = 1
- 1 - 1 = 0
- 0 - 1 = 1 (with a borrow of 1 from the next higher bit / अगले बिट से 1 उधार)
4. Complements in Number Systems (कॉम्प्लिमेंट्स थ्योरी)
Complements are used in digital computers to simplify the subtraction operation and for logical manipulation. There are two types of complements for each base r system: the radix complement (r's complement) and the diminished radix complement ((r-1)'s complement).
हिंदी: डिजिटल कंप्यूटर में घटाव (subtraction) को आसान बनाने और नेगेटिव नंबर को स्टोर करने के लिए Complements का उपयोग किया जाता है। किसी भी बेस 'r' के लिए दो प्रकार के कॉम्प्लिमेंट होते हैं: r's complement और (r-1)'s complement.
1's Complement (वन'स कॉम्प्लिमेंट)
To find the 1's complement of a binary number, simply invert every bit (change 0 to 1, and 1 to 0).
हिंदी: बाइनरी संख्या का 1's Complement निकालने के लिए बस 0 को 1 में और 1 को 0 में बदल दें।
1's Complement: 0100110
2's Complement (टू'स कॉम्प्लिमेंट)
The 2's complement is found by adding 1 to the LSB (Least Significant Bit) of the 1's complement. This is the standard way computers represent negative numbers.
हिंदी: 2's Complement निकालने के लिए, पहले संख्या का 1's Complement निकालें और फिर उसमें 1 जोड़ दें। कंप्यूटर नेगेटिव संख्याओं को स्टोर करने के लिए 2's Complement का ही इस्तेमाल करते हैं।
Step 1 (1's comp): 010011
Step 2 (Add 1) : 010011 + 1 = 010100
Result: 010100
Subtraction using 2's Complement (2's Complement का उपयोग करके घटाव)
Subtracting B from A (A - B) is the same as A + (2's complement of B). This allows the computer to use an adder circuit for subtraction, saving hardware cost.
हिंदी: A में से B को घटाने (A - B) का मतलब है A में (B का 2's Complement) जोड़ना। इससे कंप्यूटर को अलग से घटाव का सर्किट (subtractor) बनाने की जरूरत नहीं पड़ती, वह जोड़ने वाले सर्किट (adder) से ही काम चला लेता है।
A = 1100
B = 1010
Step 1: Find 2's complement of B (1010).
1's comp = 0101. Add 1 = 0110.
Step 2: Add A and 2's comp of B.
1100
+ 0110
------
1 0010
Step 3: Discard the end carry (1).
Final Result: 0010 (Which is +2 in decimal).
5. Binary Codes (बाइनरी कोड्स)
While number systems represent mathematical values, binary codes map numbers, letters, and symbols to specific bit patterns.
हिंदी: नंबर सिस्टम जहाँ गणितीय मान (values) बताते हैं, वहीं बाइनरी कोड अक्षरों, चिह्नों और संख्याओं को विशेष बिट पैटर्न में दर्शाते हैं।
- BCD (Binary Coded Decimal): Also known as 8421 code. Each decimal digit is represented by a 4-bit binary sequence. Example: (45)10 in BCD is 0100 0101.
- Excess-3 Code: An unweighted code derived by adding 3 (0011) to each BCD digit. Used in older computers and cash registers.
- Gray Code: A non-weighted, cyclic code where successive values differ by only one bit. Extensively used in Karnaugh Maps (K-maps) and error correction.
- ASCII: American Standard Code for Information Interchange. A 7-bit code representing 128 standard characters.
- EBCDIC: Extended Binary Coded Decimal Interchange Code. An 8-bit code used primarily on IBM mainframes.
6. Important Points for Exam Preparation (परीक्षा के लिए महत्वपूर्ण बिंदु)
🔥 Target Focus for Competitive Exams (Teaching Exams, Gate, State PSUs)
If you are preparing for advanced computer science exams, pay strict attention to the following trick areas that frequently appear in objective type papers:
हिंदी: कंप्यूटर टीचर या अन्य राज्य स्तरीय कंप्यूटर परीक्षाओं के लिए, इन महत्वपूर्ण बिंदुओं को रट लें, ये ऑब्जेक्टिव सवालों में बार-बार आते हैं:
READ This POST....
1. Computer Fundamentals MCQs 2026 | कंप्यूटर फंडामेंटल MCQ टेस्ट हिंदी + English – 50 Questions”
2. 500+ Computer GK MCQ in Hindi & English | Top Important Questions for Exams
- Fractional Conversions: Students often master integer conversion but fail at fractions like (0.625)10 to binary. Remember: Multiply by base and take the integer part top-to-bottom.
- Sign-Magnitude Representation: In an n-bit register, the MSB is the sign bit (0 for positive, 1 for negative). The range for 2's complement representation in n bits is from -2n-1 to +(2n-1 - 1).
Exam trick: For an 8-bit system, the range is -128 to +127. - Fast Base-Power Conversions: Never convert Octal to Decimal and then to Hexadecimal. Directly map Octal → Binary (3 bits) → Hexadecimal (4 bits). It saves crucial minutes in exams.
- Self-Complementing Codes: Excess-3 and 2421 are self-complementing codes. This is a direct one-mark question. BCD (8421) is not self-complementing.
- Gray Code to Binary: Know the XOR trick. To convert Gray to Binary, write down the MSB as is. Then XOR the current binary bit with the next Gray bit to get the next binary bit.
- Identify Valid Base: A question might give an equation like (123)x = (27)10 and ask for the base 'x'. Remember that 'x' must be strictly greater than the largest digit in the number (so x > 3 here). Form the polynomial equation: 1*x2 + 2*x1 + 3*x0 = 27 and solve for x.
- Negative Number Storage: A common exam question: "How is -13 stored in an 8-bit computer?" You must find the binary of +13 (00001101) and calculate its 2's complement (11110011).
Advanced Boolean Algebra, Logic Gates & K-Map (बूलियन बीजगणित और लॉजिक गेट्स)
Boolean Algebra is a branch of mathematics that deals with operations on logical values: 1 (True) and 0 (False). Invented by George Boole in 1854, it forms the foundational logic for modern digital computer circuits and microprocessors.
हिंदी में: बूलियन बीजगणित (Boolean Algebra) गणित की वह शाखा है जो लॉजिकल वैल्यूज़ (0 और 1) पर काम करती है। इसका आविष्कार 1854 में जॉर्ज बूल (George Boole) ने किया था। यह आधुनिक डिजिटल कंप्यूटर सर्किट और माइक्रोप्रोसेसरों का आधार है। इसमें सामान्य बीजगणित की तरह जोड़-घटाव नहीं होता, बल्कि लॉजिकल ऑपरेशन्स (AND, OR, NOT) होते हैं।
1. Logic Gates (लॉजिक गेट्स)
A logic gate is a basic building block of a digital circuit that has two or more inputs and exactly one output. The relationship between the input and the output is based on a certain logic.
हिंदी: लॉजिक गेट किसी भी डिजिटल सर्किट का बुनियादी ढांचा (building block) होता है। इसमें एक या अधिक इनपुट हो सकते हैं, लेकिन आउटपुट हमेशा एक ही होता है। इनपुट और आउटपुट के बीच का संबंध एक विशिष्ट लॉजिक पर आधारित होता है।
A. Basic Gates (बेसिक गेट्स)
- NOT Gate (Inverter): Output is the complement of the input. If input A=1, output Y=0. Expression:
Y = A' - AND Gate (Multiplication): Output is High (1) ONLY if ALL inputs are High (1). Expression:
Y = A . B - OR Gate (Addition): Output is High (1) if AT LEAST ONE input is High (1). Expression:
Y = A + B
B. Universal Gates (यूनिवर्सल गेट्स)
NAND and NOR are called Universal Gates because any digital circuit or logic gate (AND, OR, NOT) can be constructed using only NAND gates or only NOR gates.
हिंदी: NAND और NOR को यूनिवर्सल गेट्स कहा जाता है क्योंकि केवल इनका उपयोग करके किसी भी अन्य बेसिक गेट (AND, OR, NOT) या डिजिटल सर्किट को बनाया जा सकता है। परीक्षा की दृष्टि से यह सबसे महत्वपूर्ण विषय है।
- NAND Gate (NOT + AND): Output is 0 ONLY when all inputs are 1. Expression:
Y = (A . B)' - NOR Gate (NOT + OR): Output is 1 ONLY when all inputs are 0. Expression:
Y = (A + B)'
C. Special Purpose Gates (विशेष गेट्स)
- XOR Gate (Exclusive-OR): Output is 1 if inputs are DIFFERENT (e.g., 0,1 or 1,0). It is also known as the inequality detector or odd-parity generator. Expression:
Y = A ⊕ B = A'B + AB' - XNOR Gate (Exclusive-NOR): Output is 1 if inputs are the SAME (e.g., 0,0 or 1,1). It is an equality detector. Expression:
Y = A ⊙ B = AB + A'B'
2. Boolean Laws and Theorems (बूलियन नियम और प्रमेय)
| Law / Theorem | AND Logic (.) | OR Logic (+) |
|---|---|---|
| Identity Law | A . 1 = A | A + 0 = A |
| Annulment Law | A . 0 = 0 | A + 1 = 1 |
| Idempotent Law | A . A = A | A + A = A |
| Complement Law | A . A' = 0 | A + A' = 1 |
| Commutative Law | A . B = B . A | A + B = B + A |
| Associative Law | A . (B . C) = (A . B) . C | A + (B + C) = (A + B) + C |
| Absorption Law (V. Imp) | A . (A + B) = A | A + (A . B) = A |
De Morgan's Theorems (डी मॉर्गन के प्रमेय)
De Morgan's theorems are extremely crucial for simplifying Boolean expressions. They show the relationship between AND and OR gates via inversion.
हिंदी: डी मॉर्गन के नियम बूलियन समीकरणों को सरल बनाने के लिए सबसे जरूरी हैं। यह इनवर्जन (inversion) के माध्यम से AND और OR गेट्स के बीच का संबंध बताते हैं।
(A . B)' = A' + B' (NAND = Bubbled OR)Theorem 2: The complement of a sum is equal to the product of the complements.
(A + B)' = A' . B' (NOR = Bubbled AND)
3. SOP and POS Forms (Minterms & Maxterms)
Any Boolean function can be expressed in canonical (standard) forms:
हिंदी: किसी भी बूलियन फंक्शन को दो मानक (standard) रूपों में दर्शाया जा सकता है:
- Sum of Products (SOP): A sum of Minterms. A minterm is a product (AND) term containing all variables. In SOP, 1 represents the normal variable (A) and 0 represents the complemented variable (A'). It is denoted by Σm.
Example: Y = A'BC + AB'C + ABC - Product of Sums (POS): A product of Maxterms. A maxterm is a sum (OR) term containing all variables. In POS, 0 represents the normal variable (A) and 1 represents the complemented variable (A'). It is denoted by ΠM.
Example: Y = (A+B+C') . (A'+B+C)
4. Karnaugh Map (K-Map) Simplification (के-मैप)
The K-Map is a graphical method used to minimize Boolean expressions without using algebra. It uses a grid where each cell represents a minterm (or maxterm). The cells are arranged using Gray Code (00, 01, 11, 10) so that adjacent cells differ by only one variable.
हिंदी: K-Map (Karnaugh Map) बूलियन समीकरणों को बिना लंबे फॉर्मूले लगाए, ग्राफ के जरिये सरल (minimize) करने का एक तरीका है। इसके ग्रिड में ग्रे कोड (Gray Code) का उपयोग होता है (00, 01, 11, 10), ताकि आस-पास के बॉक्स में केवल एक बिट (bit) का अंतर हो।
Rules for Grouping in K-Map (K-Map में ग्रुपिंग के नियम)
- Groups must contain 1s (for SOP) or 0s (for POS). No blank spaces or opposite values allowed.
- Groups must be formed in powers of 2 (e.g., 1, 2, 4, 8, 16 cells).
- Pairs (2 cells): Eliminates 1 variable.
- Quads (4 cells): Eliminates 2 variables.
- Octets (8 cells): Eliminates 3 variables.
- Groups can overlap, and you can wrap around the edges (rolling the map). The top row is adjacent to the bottom row, and the leftmost column is adjacent to the rightmost column.
- Always aim to make the largest possible group to get the simplest expression.
Example: 3-Variable K-Map Simplification
Simplify the Boolean function: F(A, B, C) = Σm(0, 2, 4, 6)
m0 (000), m2 (010), m4 (100), m6 (110)
Step 2: Place 1s in the K-Map
- Cell 0 (A=0, BC=00): Put 1
- Cell 2 (A=0, BC=10): Put 1
- Cell 4 (A=1, BC=00): Put 1
- Cell 6 (A=1, BC=10): Put 1
Step 3: Grouping
Notice that columns 00 and 10 have 1s.
Because of the "roll-over" property of K-Maps, the leftmost column (BC=00) and rightmost column (BC=10) are adjacent.
We can combine all four 1s to form a Quad.
Step 4: Extract the Expression
- Look at rows: The group spans both A=0 and A=1. Therefore, 'A' changes and is eliminated.
- Look at columns: The group spans BC=00 and BC=10. 'B' changes from 0 to 1 (eliminated). 'C' remains 0 in both.
- Since we are using SOP, C=0 corresponds to C'.
Final Simplified Expression:
F = C'
5. Don't Care Conditions (X)
Sometimes certain combinations of inputs will never occur. The outputs for these combinations are marked as "Don't Care" (X). In a K-Map, an 'X' can be treated as either a 1 or a 0—whichever helps form a larger group. You are not forced to group 'X's if they don't help.
हिंदी: कभी-कभी कुछ इनपुट कॉम्बिनेशन कभी नहीं आते। ऐसे मामलों में आउटपुट को "Don't Care" (X) माना जाता है। K-Map में 'X' को अपनी सुविधानुसार 1 या 0 माना जा सकता है। अगर 'X' की मदद से कोई बड़ा ग्रुप (जैसे 4 या 8 का) बन रहा है, तो उसे शामिल करें, अन्यथा उसे छोड़ दें।
6. Golden Target Facts for Teaching & State Exams (परीक्षा के लिए रामबाण तथ्य)
🔥 High-Yield Exam Tricks for State Computer Science Teaching Exams
If you are preparing for standard competitive teaching or engineering exams, these tables and facts are frequently asked directly as 1-mark objective questions:
हिंदी: कंप्यूटर शिक्षक और राज्य स्तरीय परीक्षाओं में सीधे पूछे जाने वाले सबसे महत्वपूर्ण ऑब्जेक्टिव प्रश्न:
A. Minimum Universal Gates Required (रट लें)
How many NAND/NOR gates are needed to build basic gates?
| Gate to Implement | Minimum NAND Gates | Minimum NOR Gates |
|---|---|---|
| NOT | 1 | 1 |
| AND | 2 | 3 |
| OR | 3 | 2 |
| XOR | 4 | 5 |
| XNOR | 5 | 4 |
- Absorption Law Trick: Questions often give long expressions like
A + A'B + A'B'C. Use the ruleA + A'B = A + Bto simplify it instantly without drawing a K-map. - Gray Code Sequence in K-Map: A common exam question is "Why is the sequence 00, 01, 11, 10 used in K-Maps instead of normal binary?" Answer: Because it is a Gray code sequence where only one bit changes at a time, ensuring logical adjacency.
- Half Adder / Half Subtractor Gates: Both require exactly 1 XOR gate and 1 AND gate. If implemented via NAND gates only, both require exactly 5 NAND gates.
- Dual of a Function: To find the dual, change AND (.) to OR (+), OR (+) to AND (.), 0 to 1, and 1 to 0. Do not complement the variables.
- Prime Implicants (PI) vs. Essential Prime Implicants (EPI): A Prime Implicant is any group you can form. An Essential Prime Implicant is a group that contains at least one '1' that cannot be covered by any other group. The final simplified equation is made up of EPIs.
- Number of Cells in K-Map: For 'n' variables, the K-Map has 2n cells. (e.g., 4 variables = 16 cells).
Advanced Boolean Algebra, Logic Gates & K-Map (बूलियन बीजगणित और लॉजिक गेट्स)
Boolean Algebra is a branch of mathematics that deals with operations on logical values: 1 (True) and 0 (False). Invented by George Boole in 1854, it forms the foundational logic for modern digital computer circuits and microprocessors.
हिंदी में: बूलियन बीजगणित (Boolean Algebra) गणित की वह शाखा है जो लॉजिकल वैल्यूज़ (0 और 1) पर काम करती है। इसका आविष्कार 1854 में जॉर्ज बूल (George Boole) ने किया था। यह आधुनिक डिजिटल कंप्यूटर सर्किट और माइक्रोप्रोसेसरों का आधार है। इसमें सामान्य बीजगणित की तरह जोड़-घटाव नहीं होता, बल्कि लॉजिकल ऑपरेशन्स (AND, OR, NOT) होते हैं।
1. Logic Gates (लॉजिक गेट्स)
A logic gate is a basic building block of a digital circuit that has two or more inputs and exactly one output. The relationship between the input and the output is based on a certain logic.
हिंदी: लॉजिक गेट किसी भी डिजिटल सर्किट का बुनियादी ढांचा (building block) होता है। इसमें एक या अधिक इनपुट हो सकते हैं, लेकिन आउटपुट हमेशा एक ही होता है। इनपुट और आउटपुट के बीच का संबंध एक विशिष्ट लॉजिक पर आधारित होता है।
A. Basic Gates (बेसिक गेट्स)
- NOT Gate (Inverter): Output is the complement of the input. If input A=1, output Y=0. Expression:
Y = A' - AND Gate (Multiplication): Output is High (1) ONLY if ALL inputs are High (1). Expression:
Y = A . B - OR Gate (Addition): Output is High (1) if AT LEAST ONE input is High (1). Expression:
Y = A + B
B. Universal Gates (यूनिवर्सल गेट्स)
NAND and NOR are called Universal Gates because any digital circuit or logic gate (AND, OR, NOT) can be constructed using only NAND gates or only NOR gates.
हिंदी: NAND और NOR को यूनिवर्सल गेट्स कहा जाता है क्योंकि केवल इनका उपयोग करके किसी भी अन्य बेसिक गेट (AND, OR, NOT) या डिजिटल सर्किट को बनाया जा सकता है। परीक्षा की दृष्टि से यह सबसे महत्वपूर्ण विषय है।
- NAND Gate (NOT + AND): Output is 0 ONLY when all inputs are 1. Expression:
Y = (A . B)' - NOR Gate (NOT + OR): Output is 1 ONLY when all inputs are 0. Expression:
Y = (A + B)'
C. Special Purpose Gates (विशेष गेट्स)
- XOR Gate (Exclusive-OR): Output is 1 if inputs are DIFFERENT (e.g., 0,1 or 1,0). It is also known as the inequality detector or odd-parity generator. Expression:
Y = A ⊕ B = A'B + AB' - XNOR Gate (Exclusive-NOR): Output is 1 if inputs are the SAME (e.g., 0,0 or 1,1). It is an equality detector. Expression:
Y = A ⊙ B = AB + A'B'
2. Boolean Laws and Theorems (बूलियन नियम और प्रमेय)
| Law / Theorem | AND Logic (.) | OR Logic (+) |
|---|---|---|
| Identity Law | A . 1 = A | A + 0 = A |
| Annulment Law | A . 0 = 0 | A + 1 = 1 |
| Idempotent Law | A . A = A | A + A = A |
| Complement Law | A . A' = 0 | A + A' = 1 |
| Commutative Law | A . B = B . A | A + B = B + A |
| Associative Law | A . (B . C) = (A . B) . C | A + (B + C) = (A + B) + C |
| Absorption Law (V. Imp) | A . (A + B) = A | A + (A . B) = A |
De Morgan's Theorems (डी मॉर्गन के प्रमेय)
De Morgan's theorems are extremely crucial for simplifying Boolean expressions. They show the relationship between AND and OR gates via inversion.
हिंदी: डी मॉर्गन के नियम बूलियन समीकरणों को सरल बनाने के लिए सबसे जरूरी हैं। यह इनवर्जन (inversion) के माध्यम से AND और OR गेट्स के बीच का संबंध बताते हैं।
(A . B)' = A' + B' (NAND = Bubbled OR)Theorem 2: The complement of a sum is equal to the product of the complements.
(A + B)' = A' . B' (NOR = Bubbled AND)
3. SOP and POS Forms (Minterms & Maxterms)
Any Boolean function can be expressed in canonical (standard) forms:
हिंदी: किसी भी बूलियन फंक्शन को दो मानक (standard) रूपों में दर्शाया जा सकता है:
- Sum of Products (SOP): A sum of Minterms. A minterm is a product (AND) term containing all variables. In SOP, 1 represents the normal variable (A) and 0 represents the complemented variable (A'). It is denoted by Σm.
Example: Y = A'BC + AB'C + ABC - Product of Sums (POS): A product of Maxterms. A maxterm is a sum (OR) term containing all variables. In POS, 0 represents the normal variable (A) and 1 represents the complemented variable (A'). It is denoted by ΠM.
Example: Y = (A+B+C') . (A'+B+C)
4. Karnaugh Map (K-Map) Simplification (के-मैप)
The K-Map is a graphical method used to minimize Boolean expressions without using algebra. It uses a grid where each cell represents a minterm (or maxterm). The cells are arranged using Gray Code (00, 01, 11, 10) so that adjacent cells differ by only one variable.
हिंदी: K-Map (Karnaugh Map) बूलियन समीकरणों को बिना लंबे फॉर्मूले लगाए, ग्राफ के जरिये सरल (minimize) करने का एक तरीका है। इसके ग्रिड में ग्रे कोड (Gray Code) का उपयोग होता है (00, 01, 11, 10), ताकि आस-पास के बॉक्स में केवल एक बिट (bit) का अंतर हो।
Rules for Grouping in K-Map (K-Map में ग्रुपिंग के नियम)
- Groups must contain 1s (for SOP) or 0s (for POS). No blank spaces or opposite values allowed.
- Groups must be formed in powers of 2 (e.g., 1, 2, 4, 8, 16 cells).
- Pairs (2 cells): Eliminates 1 variable.
- Quads (4 cells): Eliminates 2 variables.
- Octets (8 cells): Eliminates 3 variables.
- Groups can overlap, and you can wrap around the edges (rolling the map). The top row is adjacent to the bottom row, and the leftmost column is adjacent to the rightmost column.
- Always aim to make the largest possible group to get the simplest expression.
Example: 3-Variable K-Map Simplification
Simplify the Boolean function: F(A, B, C) = Σm(0, 2, 4, 6)
m0 (000), m2 (010), m4 (100), m6 (110)
Step 2: Place 1s in the K-Map
- Cell 0 (A=0, BC=00): Put 1
- Cell 2 (A=0, BC=10): Put 1
- Cell 4 (A=1, BC=00): Put 1
- Cell 6 (A=1, BC=10): Put 1
Step 3: Grouping
Notice that columns 00 and 10 have 1s.
Because of the "roll-over" property of K-Maps, the leftmost column (BC=00) and rightmost column (BC=10) are adjacent.
We can combine all four 1s to form a Quad.
Step 4: Extract the Expression
- Look at rows: The group spans both A=0 and A=1. Therefore, 'A' changes and is eliminated.
- Look at columns: The group spans BC=00 and BC=10. 'B' changes from 0 to 1 (eliminated). 'C' remains 0 in both.
- Since we are using SOP, C=0 corresponds to C'.
Final Simplified Expression:
F = C'
5. Don't Care Conditions (X)
Sometimes certain combinations of inputs will never occur. The outputs for these combinations are marked as "Don't Care" (X). In a K-Map, an 'X' can be treated as either a 1 or a 0—whichever helps form a larger group. You are not forced to group 'X's if they don't help.
हिंदी: कभी-कभी कुछ इनपुट कॉम्बिनेशन कभी नहीं आते। ऐसे मामलों में आउटपुट को "Don't Care" (X) माना जाता है। K-Map में 'X' को अपनी सुविधानुसार 1 या 0 माना जा सकता है। अगर 'X' की मदद से कोई बड़ा ग्रुप (जैसे 4 या 8 का) बन रहा है, तो उसे शामिल करें, अन्यथा उसे छोड़ दें।
6. Golden Target Facts for Teaching & State Exams (परीक्षा के लिए रामबाण तथ्य)
🔥 High-Yield Exam Tricks for State Computer Science Teaching Exams
If you are preparing for standard competitive teaching or engineering exams, these tables and facts are frequently asked directly as 1-mark objective questions:
हिंदी: कंप्यूटर शिक्षक और राज्य स्तरीय परीक्षाओं में सीधे पूछे जाने वाले सबसे महत्वपूर्ण ऑब्जेक्टिव प्रश्न:
A. Minimum Universal Gates Required (रट लें)
How many NAND/NOR gates are needed to build basic gates?
| Gate to Implement | Minimum NAND Gates | Minimum NOR Gates |
|---|---|---|
| NOT | 1 | 1 |
| AND | 2 | 3 |
| OR | 3 | 2 |
| XOR | 4 | 5 |
| XNOR | 5 | 4 |
- Absorption Law Trick: Questions often give long expressions like
A + A'B + A'B'C. Use the ruleA + A'B = A + Bto simplify it instantly without drawing a K-map. - Gray Code Sequence in K-Map: A common exam question is "Why is the sequence 00, 01, 11, 10 used in K-Maps instead of normal binary?" Answer: Because it is a Gray code sequence where only one bit changes at a time, ensuring logical adjacency.
- Half Adder / Half Subtractor Gates: Both require exactly 1 XOR gate and 1 AND gate. If implemented via NAND gates only, both require exactly 5 NAND gates.
- Dual of a Function: To find the dual, change AND (.) to OR (+), OR (+) to AND (.), 0 to 1, and 1 to 0. Do not complement the variables.
- Prime Implicants (PI) vs. Essential Prime Implicants (EPI): A Prime Implicant is any group you can form. An Essential Prime Implicant is a group that contains at least one '1' that cannot be covered by any other group. The final simplified equation is made up of EPIs.
- Number of Cells in K-Map: For 'n' variables, the K-Map has 2n cells. (e.g., 4 variables = 16 cells).
Previous Year MCQs: Number System & Digital Logic (Part 1)
Practice these highly repeated multiple-choice questions (MCQs) for your upcoming computer science and teaching exams. Click the "Show Answer" button to reveal the correct option and detailed explanation.
Top 20 important FAQs: Computer Number System & Logic Gates
1. What is a computer number system?
A computer number system is a mathematical way of representing numbers in a computer architecture. The most common types are Binary, Octal, Decimal, and Hexadecimal.
हिंदी: कंप्यूटर नंबर सिस्टम एक तरीका है जिससे कंप्यूटर में डेटा और संख्याओं को दर्शाया जाता है (जैसे बाइनरी, ऑक्टल)।
2. Why do computers use the binary number system?
Computers use binary (0s and 1s) because they are built using electronic switches (transistors) that only have two states: ON (1) and OFF (0).
हिंदी: कंप्यूटर इलेक्ट्रॉनिक सर्किट से बने होते हैं जिनमें केवल दो अवस्थाएं होती हैं: ON (1) और OFF (0), इसलिए वे बाइनरी का उपयोग करते हैं।
3. What are the 4 types of number systems?
The four main types are Binary (Base 2), Octal (Base 8), Decimal (Base 10), and Hexadecimal (Base 16).
हिंदी: चार मुख्य प्रकार हैं: बाइनरी (बेस 2), ऑक्टल (बेस 8), डेसिमल (बेस 10), और हेक्साडेसिमल (बेस 16)।
4. How do you convert decimal to binary?
You convert a decimal to binary by repeatedly dividing the decimal number by 2 and recording the remainders from bottom to top.
हिंदी: डेसिमल को 2 से बार-बार भाग देकर और नीचे से ऊपर की ओर शेषफल (remainder) लिखकर बाइनरी में बदला जाता है।
5. What is the base of the Hexadecimal number system?
The base or radix of the hexadecimal system is 16. It uses digits 0-9 and letters A-F.
हिंदी: हेक्साडेसिमल का बेस 16 होता है। इसमें 0-9 अंक और A-F अक्षर होते हैं।
6. What are universal logic gates?
NAND and NOR gates are called universal gates because any digital circuit or basic logic gate can be built using only these gates.
हिंदी: NAND और NOR को यूनिवर्सल गेट कहा जाता है क्योंकि केवल इनका उपयोग करके कोई भी अन्य गेट बनाया जा सकता है।
7. What is the difference between 1's complement and 2's complement?
1's complement is found by inverting all bits (0 to 1, 1 to 0). 2's complement is found by adding 1 to the 1's complement.
हिंदी: 1's कॉम्प्लिमेंट में बिट्स को उल्टा किया जाता है, जबकि 2's कॉम्प्लिमेंट में 1's कॉम्प्लिमेंट के साथ 1 जोड़ा जाता है।
8. What is a Karnaugh Map (K-Map)?
A K-Map is a graphical representation used to simplify Boolean algebra expressions without needing complex mathematical formulas.
हिंदी: K-Map एक ग्राफिकल तरीका है जिससे बूलियन समीकरणों को आसानी से सरल (minimize) किया जाता है।
9. How many cells are in a 4-variable K-map?
A 4-variable K-map has 16 cells (calculated as 2^4 = 16).
हिंदी: 4-वेरिएबल K-map में 16 सेल (2^4) होते हैं।
10. What is SOP and POS in Digital Electronics?
SOP stands for Sum of Products (e.g., AB + CD). POS stands for Product of Sums (e.g., (A+B)(C+D)).
हिंदी: SOP का मतलब 'Sum of Products' और POS का मतलब 'Product of Sums' होता है।
11. What is the Gray Code?
Gray code is an unweighted binary code where two successive values differ by only one bit. It is heavily used in K-maps.
हिंदी: ग्रे कोड में लगातार आने वाली दो संख्याओं के बीच केवल 1 बिट का अंतर होता है।
12. What is De Morgan's Theorem?
It states that the complement of a product is the sum of complements (A.B)' = A' + B', and the complement of a sum is the product of complements (A+B)' = A'.B'.
हिंदी: इसके अनुसार (A.B)' = A' + B' और (A+B)' = A'.B' होता है।
13. What is a Multiplexer (MUX)?
A MUX is a combinational circuit that selects one of many input signals and outputs it to a single line. It's also called a data selector.
हिंदी: MUX कई इनपुट में से किसी एक को चुनकर आउटपुट पर भेजता है। इसे डेटा सिलेक्टर भी कहते हैं.
14. What is a Flip-Flop?
A flip-flop is a basic memory circuit in digital electronics that can store exactly one bit of data (either 0 or 1).
हिंदी: फ्लिप-फ्लॉप एक मेमोरी सर्किट है जो 1 बिट डेटा (0 या 1) स्टोर करता है।
15. What is the BCD Code?
BCD (Binary Coded Decimal) represents each decimal digit (0-9) with a 4-bit binary sequence. It is also known as the 8421 code.
हिंदी: BCD कोड प्रत्येक डेसिमल अंक को 4-बिट बाइनरी में दर्शाता है। इसे 8421 कोड भी कहते हैं।
16. What is the difference between a Half Adder and Full Adder?
A Half Adder adds two single bits. A Full Adder adds three bits (two significant bits and an incoming carry bit).
हिंदी: हाफ एडर दो बिट्स को जोड़ता है, जबकि फुल एडर तीन बिट्स (Carry सहित) को जोड़ता है।
17. What is an Excess-3 code?
Excess-3 is an unweighted, self-complementing code derived by adding 3 (0011 in binary) to the BCD value of a decimal digit.
हिंदी: BCD कोड में 3 (0011) जोड़ने पर Excess-3 कोड बनता है।
18. Which logic gate is an equality detector?
The XNOR (Exclusive-NOR) gate is an equality detector because it outputs 1 only when both inputs are the same.
हिंदी: XNOR गेट को समानता डिटेक्टर कहा जाता है क्योंकि जब दोनों इनपुट समान होते हैं तभी आउटपुट 1 होता है।
19. How does a computer perform subtraction?
Computers perform subtraction using the 2's complement addition method, which saves hardware costs by using the same circuit for both addition and subtraction.
हिंदी: कंप्यूटर घटाने के लिए 2's कॉम्प्लिमेंट मेथड का उपयोग करते हैं।
20. What is a Don't Care condition in a K-Map?
A "Don't Care" (represented by X) is an output state for an input combination that will never occur. It can be treated as a 0 or a 1 to help form larger groups in a K-Map.
हिंदी: 'डोंट केयर' स्थिति को 'X' से दर्शाते हैं। इसे सुविधा के अनुसार 0 या 1 माना जा सकता है।