1. Trang chủ
  2. » Mẫu Slide

Lecture Computer organization and assembly language - Lecture 03: Data Representation 2 - TRƯỜNG CÁN BỘ QUẢN LÝ GIÁO DỤC THÀNH PHỐ HỒ CHÍ MINH

10 6 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 10
Dung lượng 128,14 KB

Nội dung

Computer Organization and Assembly Language.. Lecture 03: Data Representation 02..[r]

(1)

CSC 221

Computer Organization and Assembly Language

(2)

Lecture 02: Review

• Data Representation

• Decimal Representation • Binary Representation • Two’s Complement

(3)

Lecture Outline

• Data Representation

• Binary Multiplication • Binary Division

(4)

Binary Multiplication

• Multiplication follows the general

principal of shift and add.

• The rules include:

• * =

• * =

• * =

(5)

Binary Multiplication EXAMPLE 1

Complete 15 * in binary.

1 Convert to binary

15 = 000011112

5 = 000001012

3 Ignore any insignificant zeros.

000011112

000001012

(6)

Binary Multiplication

EXAMPLE 1

3 Multiply the first number

1 1 12 1 1 1

5 Now this is where the shift and takes place

x

(7)

Binary Multiplication

EXAMPLE 1

5 Shift one place to the left and multiple the

second digit 1 12

1 1 1 0 0

x 1111 x = 0000

(8)

Binary Multiplication

EXAMPLE 1

6 Shift one place to the left and multiple the third

digit

1 1 12 1 1 1 0 0 1 1 0

x 1111 x = 1111

(9)

Binary Multiplication

EXAMPLE :

7 Add the total of all the steps

1 1 0 0 1 1 0 0 1

9 Convert back to decimal to check

(10)

Binary Division

• Division in binary is similar to

long division in decimal.

• It uses what is called a shift

Ngày đăng: 01/04/2021, 18:05

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN