Bài tập phép toán số học trên máy tính (kỹ thuật máy tính) (Có lời giải chi tiết)

16 271 0
Bài tập phép toán số học trên máy tính (kỹ thuật máy tính)  (Có lời giải chi tiết)

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

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Phép toán số học trên máy tính Các nội dung lưu trữ trong máy tính điều được biểu diễn ở dạng bit (giá trị của nó biểu diễn dưới dạng nhị phân, là 1 chuổi các ký tự 0, 1). Trong chương 2, các số nguyên khi lưu trữ trong máy tính điều là các chuổi nhị phân, hay các lệnh thực thi cũng lưu dưới dạng nhị phân. Vậy các dạng số khác thì biểu diễn như thế nào ? Ví dụ: ■ phần lẻ của số thực được biểu diển, lưu trữ như thế nào? ■ Điều gì sẽ xảy ra nếu kết quả của 1 phép toán sinh ra 1 số lớn hơn khả năng biểu diễn, hay lưu trữ ? ■ Và một câu hỏi đặt ra là phép nhân và phép chia được phần cứng của máy tính thực hiện như thế nào? Bài tập phép toán số học trên máy tính (kỹ thuật máy tính) (Có lời giải chi tiết) Exercise 1: Let’s look in more detail at division. We will use the octal numbers in the following table. 1. Calculate A divided by B using the hardware described in Figure 1 and the algorithm shown in Figure 2. You should show the contents of each register on each step. Assume A and B are unsigned 6bit integers. 2 . Calculate A divided by B using the hardware described in Figure 3. You should show the contents of each register on each step. Assume A and B are unsigned 6bit integers. Exercise 2: The following table shows decimal numbers a 1609.5 b 938.8125 1. Write down the binary representation of the decimal number, assuming the IEEE 754 single precision format. Exercise 3: Let’s look in more detail at division. We will use the decimal numbers in the following table. A B A 13 20 B 30 9 1. Calculate A divided by B using the hardware described in Figure 1 and the algorithm shown in Figure 2. You should show the contents of each register on each step. Assume A and B are unsigned 6bit integers. 2. Calculate A divided by B using the hardware described in Figure 3. You should show the contents of each register on each step. Assume A and B are unsigned 6bit integers.

Ngày đăng: 12/09/2018, 18:05

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan