Topic 1
Topic 1
❑ Information in an electronic form that can be stored and used by a computer. (Cambridge
Dictionary)
❑ Raw data needs to be processed to convert into useful information. It includes data storage,
retrieval, manipulation and analysis.
SIGNAL
❑ Data holds valuable information but it needs a medium to be transmitted, processed and
communicated.
❑ Signals are physical quantities that carry the encoded information derived from data.
❑ In digital electronics, data is converted into binary signals for efficient transmission and
processing.
❑ Unlike analog signals, discrete signals do not have infinite precision and can only assume
specific levels.
❑ Digital signals have better noise immunity than analog signals due to their discrete nature.
❑ Applications – Digital Communication, Digital Audio and Video, Data storage, Artificial
Intelligence, Quantum computing
WHY DIGITAL?
❑ Before the digital revolution, analog signals dominated communication and data processing.
❑ Digital signals brought about significant advantages, making them the preferred choice in
various applications.
Analog Digital
Analog Digital
Analog Digital
Analog Digital
Analog Digital
Analog signals suffer from signal Digital signals can travel longer
Signal
degradation during long-distance distances without significant
Transmission
transmission. degradation.
ANALOG vs DIGITAL?
Analog Digital
Analog and digital systems have their unique advantages and applications.
Digital technology's resilience to noise, error correction, and ease of
processing have made it the preferred choice in many modern
applications.
DIGITAL ELECTRONICS IN COMPUTERS
❑ Digital electronics form the foundation of modern computing systems. Computers rely on
digital signals and logic to process, store, and transmit data.
❑ Components of a Computer:
1. Central Processing Unit (CPU):
It processes data using digital logic circuits, such as arithmetic logic units (ALUs).
2. Memory:
Computers use various types of digital memory (RAM, ROM) to store data temporarily or
permanently. Memory addresses are represented using binary values.
DIGITAL ELECTRONICS IN COMPUTERS
3. Motherboard:
The motherboard acts as a central hub, connecting and facilitating communication between
various digital components.
Example 1010112 - 1 * 20 = 1
1 * 21 = 2
0 * 22 = 0
1 * 23 = 8
0 * 24 = 0
1 * 25 = 32
Total - 4310
OCTAL TO DECIMAL
❑ Multiply each bit by 8n, where n is the weight of the bit.
Example 6248 - 4 * 80 = 4
2 * 81 = 16
6 * 82 = 384
Total - 40410
HEXADECIMAL TO DECIMAL
❑ Multiply each bit by 16n, where n is the weight of the bit.
❑ Note down the integer part (before decimal) and multiply the rest by 2.
Answer – 100.0012
OCTAL TO BINARY
4 5 78
4 5 716
2 6 6 - 2668
HEXADECIMAL OCTAL
❑ Use binary as intermediary.
BINARY TO HEXADECIMAL
❑ Group bits in 4 and convert to hexa digits. 1010111002 - 1 0101 1100
1 5 C - 15C16
Number Signed 1s complement 2s complement
0000 0 0 0
0001 1 1 1
0010 2 2 2
0011 3 3 3
0100 4 4 4
0101 5 5 5
0110 6 6 6
0111 7 7 7
1000 -0 -7 -8
1001 -1 -6 -7
1010 -2 -5 -6
1011 -3 -4 -5
1100 -4 -3 -4
1101 -5 -2 -3
1110 -6 -1 -2
1111 -7 -0 -1
1s COMPLEMENT ARITHMETIC
1. If both numbers are positive, simple binary addition is required.
iii) If there is a final carry, the result is positive and add the final (end around) carry to
the LSB.
iv) If there is no final carry, the result is negative. Convert it into 1s complement form
to get the final result.
1s COMPLEMENT ARITHMETIC
3. If both numbers are negative
iv) If there is a final carry, add the final (end around) carry to the LSB and convert
into 1s complement.
iii) If there is a final carry, the result is positive and discard the final (end around)
carry.
iv) If there is no final carry, the result is negative. Convert it into 2s complement form
to get the final result.
2s COMPLEMENT ARITHMETIC
3. If both numbers are negative
iv) If there is a final carry, ignore the carry and convert the number into 2s
complement.
❑ For a positive integer x, 9s complement (for representing -x) = 10n -1 – x (n – no. of digits)
❑ Example -11 99 – 11 = 88
10s complement
4A6 4A6
+ 1B3 -1B3
6+3=9 9 6–3=3 3
A + 5 = 15 5 9 with 1 carry A – B, Borrow 16
4 + 1 + 1(Carry) 659 = A – B + 16 = F F3
3–1=2 2F3
❑ For each subsequent bit, compute the XOR of the current bit and the previous bit in the binary
code, and assign the result to the Gray code.
❑ If we have n-bit binary code, bn-1 bn-2…..b0 then gn-1 gn-2…..g0 would be
gn-1 = bn-1
gi = bi+1 ⊕ bi where 0 ≤ i ≤ n-2
Example – Binary – 1 0 1 1 0 1
⊕ ⊕ ⊕ ⊕ ⊕
Gray - 1 1 1 0 1 1
SELF REFLECTION IN GRAY CODE
2 bit Gray code 3 bit Gray code 4 bit Gray code
00 000 0 000
01 001 0 001
11 011 0 011
10 010 0 010
110 0 110
111 0 111
101 0 101
100 0 100
1 100
1 101
1 111
1 110
1 010
1 011
1 001
1 000
GRAY TO BINARY CODE CONVERSION
❑ Copy the MSBs.
❑ For each subsequent bit, compute the XOR of the current bit in the original binary and the
previous bit in the Gray code, and assign the result to the Gray code.
❑ If we have n-bit gray code, gn-1 gn-2…..g0 then binary code, bn-1 bn-2…..b0 would be
bn-1 = gn-1
bi = bi+1 ⊕ gi where 0 ≤ i ≤ n-2
Binary code 0 1 0 1