190 likes | 213 Views
Computer Organization. Introduction- Digital Systems and Binary Systems week1. Agenda. Course books Course outline Digital Systems : Definition, features Examples MAIN USE OF DIGITAL SYSTEMS Digital via Analog DIGITAL SYSTEMS - TWO CLASSES Number Systems: Decimal weight
E N D
Computer Organization Introduction- Digital Systems and Binary Systems week1
Agenda • Course books • Course outline • Digital Systems : • Definition, features • Examples • MAIN USE OF DIGITAL SYSTEMS • Digital via Analog • DIGITAL SYSTEMS - TWO CLASSES • Number Systems: • Decimal weight • Binary representation • Conversion binary to decimal and decimal to binary • Binary to hexadecimal conversion • Decimal conversion to Hexadecimal • Octal conversion to other systems
Course books: • Digital Design, M. Morris Mano, Prentice-Hall. • Computer Organization and Architecture, 7th Edition, William Stalling, Prentice-Hall.
Course contents: • Number system:(Different number systems, conversion and arithmetic operations) • Logic gates, Boolean algebra and arithmetic logic circuits:(basic logic gates, laws of Boolean algebra, deriving logical expression, simplifying logic expressions, half and Full adders, binary coded decimal adder, subtractor) • Logic devices:(Comparator, Decoder, Encoder, multiplexer) • Flip Flops and Counter:(S-R, J-K and D F/F’s in addition to counter design)
chapter 3: Buses and Computer Architecture (Processor prototype design, program simulation, computer component interconnection and interrupt) • Chapter 4 : Cache memory (Introduction, mapping and cache design and managements) • chapter 9: Computer Arithmetic • Chapter 10: Instruction Sets: Characteristics and Functions • Chapter 11: Instruction Sets: Addressing Modes and Format • Chapter 7: Input/Output
Digital Systems • Computers work with just 1s and 0s. • Groups of bits can be made to represent discrete symbols which are then used to develop digital system using different techniques. • Digital system is a system that manipulates discrete elements of information represented internally in binary form/code(1s and 0s). • Digital computers are powerful (why?) it can perform not only arithmetic computations but also logical operations and it can be programmed to make decisions based on internal and external conditions.
Digital Systems • Reliability: error-correcting codes • Cost decrease: Same hardware can be re-programmed to be used in another application. Number of transistors that can be put on a piece of silicon increases to produce complex functions, the cost per unit decreases and the speed is extremely high • Example: DVD where audio, video and other data can be recorded without any loss of data.
MAIN USE OF DIGITAL SYSTEMS: • INFORMATION PROCESSING (text, audio, visual, video) • TRANSMISSION (communication) • STORAGE
Number system: 1. Decimal • Numbers consist of a bunch of digits, each with a weight • These weights are all powers of the base, which is 10. We can rewrite this: • To find the decimal value of a number, multiply each digit by its weight and sum the products. (1 x 102) + (6 x 101) + (2 x 100) + (3 x 10-1) + (7 x 10-2) + (5 x 10-3) = 162.375
2. Binary: • Binary representation:
2.1 Convert from binary to decimal: • Example 1: 10011101 to decimal ? multiply each digit by its weight and sum the products. Digital design book page 21 1 0 0 1 1 1 0 1 1*27 + 0*26 + 0*25 + 1*24 + 1*23 + 1*22 + 0*21 + 1*20 1* 128 + 0*64 + 0*32 + 1*16 + 1*8 + 1*4 + 0* 2 + 1* 1 128 + 16 + 8 + 4 +1 157
Binary : • Example 2 :Convert the binary 1101.01 to decimal. 1 1 0 1 . 0 1 Binary digits, or bits 23 22 21 20 2-1 2-2 Weights (in base 2) • The decimal value is: (1 x 23) + (1 x 22) + (0 x 21) + (1 x 20) + (0 x 2-1) + (1 x 2-2) = 8 + 4 + 0 + 1 + 0 + 0.25 = 13.25
162 / 2 = 81 rem0 81 / 2 = 40 rem1 40 / 2 = 20 rem0 20 / 2 = 10 rem0 10 / 2 = 5 rem0 5 / 2 = 2 rem1 2 / 2 = 1 rem0 1 / 2 = 0 rem1 0.375 x 2 = 0.750 0.750 x 2 = 1.500 0.500 x 2 = 1.000 2.2 Convert from decimal to binary: • To convert a decimal integer into binary, keep dividing by 2 until the quotient is 0. Collect the remainders in reverse order. • To convert a fraction, keep multiplying the fractional part by 2 until it becomes 0. Collect the integer parts in forward order. • Example 1: 162.375: • So, 162.37510 = 10100010.0112
3. Hexadecimal(base 16): • Numbers in hexadecimal system : 0 1 2 3 4 5 6 7 8 9 A B C D E F • Is frequently used to specify things like 32-bit IP addresses and 24-bit colors.
Hex Binary Hex Binary Hex Binary Hex Binary 0 0000 4 0100 8 1000 C 1100 1 0001 5 0101 9 1001 D 1101 2 0010 6 0110 A 1010 E 1110 3 0011 7 0111 B 1011 F 1111 3.1 convert hexadecimal to binary: 261.3516 = 261 . 3516 = 001001100001 . 001101012 • Replace each hex digit with its equivalent 4-bit binary sequence. 3.2 convert binary to hexadecimal: • To convert from binary to hex, make groups of 4 bits, starting from the binary point. Add 0s to the ends of the number if needed. Then, just convert each bit group to its corresponding hex digit. 10110100.0010112 = 10110100 . 001011002 = B4 . 2C16
3.3 convert from hexadecimal to decimal: • Example 3: Convert from decimal to hex 764= ?