Computer Organization and Architecture phần 6

§ Phần mềm Poll § cuộc thăm dò thường xuyên gián đoạn dịch vụ mỗi thiết bị để xem gây ra gián đoạn § bằng cách sử dụng một dòng lệnh riêng biệt trên hệ thống xe buýt (TESTI / O)? nâng cao TESTI / O? đặt địa chỉ mô-đun I / O trên dòng địa chỉ? | 51 Multiplication o Repeated Addition o Unsigned Integers Generating partial products shifting and adding Just like longhand multiplication Two s Complement Multiplication o Straightforward multiplication will not work if either the multiplier or multiplicand are negative multiplicand would have to be padded with sign bit into a 2n-bit partial product so that the signs would line up in a negative multiplier the 1 s and 0 s would no longer correspond to addshift s and shift-only s o Simple solution Convert both multiplier and multiplicand to positive numbers Perform multiplication Take 2 s complement of result if and only if the signs of original numbers were different Other methods do not require this final transformation step Booth s Algorithm Why does Booth s Algorithm work o Consider multiplying some multiplicand M by 30 M 00011110 which would take 4 shift-adds of M one for each 1 o That is the same as multiplying M by 32 - 2 M 00100000 - 00000010 M 00100000 - M 00000010 which would take 1 shift-only on no transition imagine last bit was 0 1 shift-subtract on the transition from 0 to 1 3 shift-only s on no transition 1 shift-add on the transition from 1 to 0 2 shift-only s on no transition o We can extend this method to any number of blocks of 1 s including blocks of unit length. o Consider the smallest number of bits that can hold the 2 s complement representation of -6 So we can clearly see that a shift-subtract at the leftmost 1-0 transition will cause 8 to be subtracted from the accumulated total which is exactly what needs to happen o This will expand to an 8-bit representation The neat part is that this same and only 1-0 transition will also cause -8 to be subtracted from the 8-bit version Division o Unsigned integers 00001101 Quotient Divisor 1011 10010011 Dividend 1011 001110 1011 001111 1011 100 Remainder Floating-Point Representation Principles o Using scientific notation we can store a floating point number in 3 parts S B E Sign Significand or .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.