Docsity

Computer Organization - Prof. Emad, Slides of Digital Logic Design and Programming

Partial preview of the text

Download Computer Organization - Prof. Emad and more Slides Digital Logic Design and Programming in PDF only on Docsity!

Computer Organization

CSE 237

Section 01 - Revision

Revision : Numbering Systems

  • Convert 55. 10

to binary.

55 2 rem 1 0.625 x 2 = 1.25 → 1

27 2 rem 1 0.25 x 2 = 0.5 → 0

13 2 rem 1 0.5 x 2 = 1.0 → 1

6 2 rem 0 0

3 2 rem 1

1 2 rem 1 (55.625)

10

2

Example 2

  • There are three forms in which signed integer (whole) numbers can be represented in binary: ➢ sign-magnitude, ➢ 1 ’s complement, ➢ and 2 ’s complement.

Signed Numbers

2’s Complement Representation

Comparing the signed numbering system

1 - POS + POS → POS Answer

  • If no 2’s complement is needed, use regular binary addition.

⎯→

⎯→ +^00000101

2 - POS + NEG → POS Answer

  • Take the 2’s complement of the negative number and use regular binary

addition.

⎯→ ⎯

+^11111011

00000101  **11111010

11111011** 2’s Complement Process

1]

8 th^ Bit = 0: Answer is Positive Disregard 9th^ Bit

4 - NEG + NEG → NEG Answer

  • Take the 2 ’s complement of both negative numbers and use regular binary

addition.

- 14 ⎯→ ⎯

⎯→ +^11111011

2’s Complement Numbers, See Conversion Process In Previous Slides

1]

8 th^ Bit = 1: Answer is Negative Disregard 9th^ Bit 11110010  **00001101

00001110** To Check: Perform 2’s Complement On Answer

  • Example 1: Convert the following binary numbers to hexadecimal: a) 1100101001010111 b) 111111000101101001

Hexadecimal Numbering System

  • Add the following hexadecimal numbers: a) 58 16

16

b) DF 16

+ AC

16

Example 3

Notes: ➢If the sum of these two digits is 15 10 or less, bring down the corresponding hexadecimal digit. ➢If the sum of these two digits is greater than 15 10 , bring down the amount of the sum that exceeds 16 10 and carry a 1 to the next column.

  • Subtract the following hexadecimal numbers (Direct Subtraction):

a) A8D

16

- 3EAC 16

Example 4

Revision : Special-purpose Logic Elements

▪ Multiplexer is defined as: “ A device that allows digital information from several sources to be routed onto A single line for transmission over that line to A common destination. ” ▪ A mux is a digital switch that has multiple inputs (sources) and a single output (destination). ▪ The selection lines determine which input is connected to the output. ▪ If there are n selection lines, then there are 2 n data input lines.

Multiplexer (MUX)