c.s. choy1 itm1010 computer and communication technologies prof. c.s. choy, room 412 prof. h.k....
TRANSCRIPT
C.S. Choy 1
ITM1010 COMPUTER AND COMMUNICATION TECHNOLOGIES
Prof. C.S. Choy, room 412Prof. H.K. Tsang, room 306
Tutors: CY Poon ZJ Zhang CW Lee
SK Cheung
AssignmentsMid-term
Final
C.S. Choy 2
FIRST-HALF TERM SCHEDULE
Week (Monday)8/1 Introduction and Number System15/1 Logic Gates and Boolean Algebra22/1 Chinese New Year29/1 Conference Leave5/2 Digital Design12/2 Sequential Logic Design19/2 Computer Organization
21/3 Mid-term Examination
C.S. Choy 3
RECOMMENDED BOOKS
• Digital Electronics – A Simplified Approach
by R.D. Thompson
Prentice Hall
• The Digital Information Age
by R. Kuc
PWS Publishing
C.S. Choy 4
INFORMATION SYSTEMS
• Process – amplifier, scanner, MP3 player
• Transmit – telephone network
• Store – tape and harddisk
C.S. Choy 5
Why Digital (Binary System)?
• Information IntegrityBetter noise immunity
• Information ManipulationComputer is a binary system and its programmable characteristics offer the greatest flexibility
C.S. Choy 6
SOURCES OF DIGITAL INFORMATION• Analog Signal
• Representation of Number Values
Decimal Binary
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
10 1010
11 1011
12 1100
13 1101
14 1110
15 1111
C.S. Choy 7
BINARY NUMBER SYSTEM
e.g. (1011.11)2=
C.S. Choy 8
BINARY NOTATION
Digit is called BIT.
Possible representations: 1 0
high low
true false
LSB – Least Significant Bit
Bit change with the least effect
HSB – Most Significant Bit
Bit change with the most effect
C.S. Choy 9
BINARY MATHEMATICS
• Addition1101 + 1001 =
1310 + 910 =
• Subtraction– Rules 0 – 0 = 0
1 – 0 = 0
1 – 1 = 0
10 – 1 = 1
C.S. Choy 10
BINARY MATHEMATICS
• Multiplication1101 x 101 =
1310 x 510 =
• Division110111 ÷ 101 =
5510 ÷ 510 =
C.S. Choy 11
SIGNED BINARY NUMBER
Ones (1s) ComplementThe 1s complement of a binary number of a binary number is derived by subtracting each bit in the number to be complemented from 1.
e.g. 1s complement of 1100
C.S. Choy 12
SIGNED BINARY NUMBER
The use of complementary representation allows the subtraction process to be accomplished using addition.
Positive result – high end-round carry
Negative result – low end-round carry
C.S. Choy 13
SIGNED BINARY NUMBERTwos (2s) Complement
The 2s complement of a binary number is the 1s complement plus 1.
Positive result – high carry
Negative result – low carry
C.S. Choy 14
SIGN BITThe use of a single bit, usually the
leftmost bit to indicate the sign of a number. The meaning of the sign bit can be fixed arbitrarily. But normally,
sign bit
0 - positive number 1 - negative number
e.g. -510 = 1101
+510 = 0101
Note: the magnitude of a number is represented by the lower three bits
C.S. Choy 15
SIGN BIT1s Complement 2s Complement
range: -7 – +7 range: -8 – +7
The leftmost bit still indicates sign.
In complement representation, two numbers can be added or subtracted as usual.
e.g. 6 + (-2)
C.S. Choy 16
OVERFLOW CONDITIONSOverflow occurs whenever the sum of two positive numbers yields a negative result or when two negative numbers are summed and the result is positive. Overflow can be detected by the difference in the carry-in and carry-out of the sign bit.
C.S. Choy 17
HEXADECIMAL
C.S. Choy 18
BINARY-CODED DECIMAL BCD
C.S. Choy 19
GRAY CODE
C.S. Choy 20
AMERICAN STANDARD CODE FOR INFORMATION INTERCHANGE, ASCII
The ASCII encodes the letters in the alphabet as well as numbers, it is an alphanumeric code. It is a 7-bit code so allows representation of 128 different characters and commands.
upper-case and lower-case lettersdecimal numberspunctuation marksspecial symbolscommand codes for formatting text
Extended ASCII8-bit code allows for 128 additional graphics
characters.