Introduction to Electrical Engineering, II Instructor: Andrew B. Kahng (lecture) Email: [email protected]Telephone: 858-822-4884 office, 858-353- 0550 cell Office: 3802 AP&M Lecture: TuThu 3:30pm – 4:50pm, HSS, Room 2250 Discussion: Wed 6:00pm-6:50pm, Peterson Hall, 108 Class Website: http://vlsicad.ucsd.edu/courses/ece20b/wi03 Login: ece20b Password: b02ece ECE 20B, Winter 2003
40
Embed
Introduction to Electrical Engineering, II Instructor: Andrew B. Kahng (lecture) Email: [email protected] Telephone: 858-822-4884 office, 858-353-0550 cell.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Class Website: http://vlsicad.ucsd.edu/courses/ece20b/wi03
Login: ece20bPassword: b02ece
ECE 20B, Winter 2003
Purpose of Course
Introduction to design of digital systems and computer hardware
Basic to CS, EE, CE Major topics
– Information representation and manipulation– Logic elements and Boolean algebra– Combinational Logic– Arithmetic Logic– Sequential Logic– Registers, Counters, Memories– Control
Administration
Lab instructor: Prof. Mohan Trivedi Textbook: Mano and Kime, 2nd edition (updated)
– Goal: cover MK Chapters 1-5, (6), 8– Rizzoni (Sections 12.1-2) used only for op amps
Labs– This week: (1) show up and verify partner; (2) if you
need a partner, talk to Prof. Trivedi– If you need to switch lab sections, go to undergrad office
Adding ECE 20B– Must get stamp from undergrad office in EBU I– Prerequisites rigidly enforced
Course Structure Homework: assigned but not collected
– All problems and solutions posted on web– Exams are based on homework problems– Do problems before looking at solutions!
Discussion: Wed 6:00-6:50pm, Peterson 108– Will typically go over the previous lectures and problems
Grading– 2/5: 2 in-class midterms (Jan 30, Feb 25), – 2/5: 1 final– 1/5: un-announced in-class quizzes– Exams cover both lecture (~3/4) and lab (~1/4)
• For each lab, a set of prelab questions will be assigned. These must be included in your lab notebook.
Conversion Between Bases Convert the Integral Part
– Repeatedly divide the number by the radix you want to convert to and save the remainders. The new radix digits are the remainders in reverse order of computation.
Why does this work? This works because, the remainder left in the division is always is the coefficient of the radix’s exponent.
• If the new radix is > 10, then convert all remainders > 10 to digits A, B, …
Convert the Fractional Part– Repeatedly multiply the fraction by the radix and save the integer digits
that result. The new radix fraction digits are the integer numbers in computed order.
Why does this work?To convert fractional part, it should be divided by reciprocal of radix, which is same as multiplying with radix.
• If the new radix is > 10, then convert all integer numbers > 10 to digits A, B, …
Join together with the radix point
Example: Convert 46.687510 To Base 2
Convert 46 to Base 246/2 = 23 remainder = 0
23/2 = 11 remainder = 1
11/2 = 5 remainder = 1
5/2 = 2 remainder = 1
2/2 = 1 remainder = 0
1/2 = 0 remainder = 1
Read off in reverse order: 1011102
Convert 0.6875 to Base 2:0.6875 * 2 = 1.3750 int = 1
0.3750 * 2 = 0.7500 int = 0
0.7500 * 2 = 1.5000 int = 1
0.5000 * 2 = 1.0000 int = 1
0.0000
Read off in forward order: 0.10112
Join together with the radix point: 1011110.10112
Converting Among Octal, Hexadecimal, Binary Octal (Hexadecimal) to Binary:
– Restate the octal (hexadecimal) as three (four) binary digits, starting at radix point and going both ways
Binary to Octal (Hexadecimal):– Group the binary digits into three (four) bit groups starting at
the radix point and going both ways, padding with zeros as needed in the fractional part
– Convert each group of three (four) bits to an octal (hexadecimal) digit
Example: Octal to Binary to Hexadecimal
6 3 5 . 1 7 7 8
= 110|011|101 . 001|111|111 2
= 1|1001|1101 . 0011|1111|1(000)2 (regrouping)
= 1 9 D . 3 F 816 (converting)
Non-numeric Binary Codes Given n binary digits (called bits), a binary code
is a mapping from a subset of the 2n binary numbers to some set of represented elements.
Error-Detection Codes Redundancy (e.g. extra information), in the form of extra
bits, can be incorporated into binary code words to detect and correct errors.
A simple form of redundancy is parity, an extra bit appended onto the code word to make the number of 1’s odd or even. Parity can detect all single-bit errors and some multiple-bit errors.
A code word has even parity if the number of 1’s in the code word is even.
A code word has odd parity if the number of 1’s in the code word is odd.
3-Bit Parity Code Example Fill in the even and odd parity bits:
The binary codeword "1111" has even parity and the binary code "1110" has odd parity. Both could be used to represent data.
Even Parity Odd Parity Message - Parity Message - Parity