Physics Assignment 2 Solutions
Q1. Number Systems:
Number systems are mathematical structures used to represent numbers in different forms. There
are four common types:
1. Binary (Base-2): Uses 0 and 1 to represent numbers.
2. Decimal (Base-10): The standard system using digits 0-9.
3. Octal (Base-8): Uses digits from 0 to 7.
4. Hexadecimal (Base-16): Uses digits 0-9 and letters A-F.
Conversion from Decimal to Binary:
Example: Convert 25 to binary:
1. Divide the number by 2, noting the remainder:
- 25 ÷ 2 = 12 (remainder 1)
- 12 ÷ 2 = 6 (remainder 0)
- 6 ÷ 2 = 3 (remainder 0)
- 3 ÷ 2 = 1 (remainder 1)
- 1 ÷ 2 = 0 (remainder 1)
Reading the remainders from bottom to top, 25 in binary is 11001.
Conversion from Binary to Decimal:
Example: Convert 11001 to decimal:
- Multiply each binary digit by 2 raised to the power of its position (from right to left, starting at 0):
- 1 x 2^4 = 16
- 1 x 2^3 = 8
- 0 x 2^2 = 0
- 0 x 2^1 = 0
- 1 x 2^0 = 1
Adding the results: 16 + 8 + 1 = 25.
Q2. Basic Gates:
Logic gates are basic building blocks of digital circuits.
1. AND Gate:
- Circuit: Two inputs A and B.
- Truth Table: Outputs 1 only when both A and B are 1.
| A | B | Output |
|---|---|--------|
|0|0| 0 |
|0|1| 0 |
|1|0| 0 |
|1|1| 1 |
2. OR Gate:
- Circuit: Two inputs A and B.
- Truth Table: Outputs 1 when A or B is 1.
| A | B | Output |
|---|---|--------|
|0|0| 0 |
|0|1| 1 |
|1|0| 1 |
|1|1| 1 |
3. NOT Gate:
- Circuit: Single input A.
- Truth Table: Outputs the inverse of input.
| A | Output |
|---|--------|
|0| 1 |
|1| 0 |
4. NAND Gate:
- Combination of AND and NOT gates.
- Truth Table: Outputs 1 when the AND gate would output 0.
| A | B | Output |
|---|---|--------|
|0|0| 1 |
|0|1| 1 |
|1|0| 1 |
|1|1| 0 |
5. NOR Gate:
- Combination of OR and NOT gates.
- Truth Table: Outputs 1 when the OR gate would output 0.
| A | B | Output |
|---|---|--------|
|0|0| 1 |
|0|1| 0 |
|1|0| 0 |
|1|1| 0 |
Q3. Integrated Circuits (ICs):
ICs are small chips that can contain thousands of electronic components like transistors, resistors,
and capacitors. They are used to perform a variety of functions in electronic devices.
Types of ICs:
1. Analog ICs: Deal with continuous signals.
2. Digital ICs: Handle binary data.
3. Mixed ICs: Combine analog and digital functions.
Monolithic ICs:
These are integrated circuits where all components are manufactured on a single chip of
semiconductor material, typically silicon. They are widely used because of their compact size and
efficiency.
Advantages of ICs:
- Small size
- High reliability
- Low power consumption
- Lower cost
Disadvantages of ICs:
- Limited power handling
- Difficult to repair
- Complex to design at the micro level