E-Book Content
Design of Arithmetic Units for Digital Computers
Macmillan Computer Science Series Consulting Editor Professor F. H. Sumner, University of Manchester S. T. Allworth, Introduction to Real-time Software G. M. Birtwistle, Discrete Event Modelling on Simula Richard Bornat, Understanding and Writing Compilers J. K. Buckle, The ICL 2900 Series Derek Coleman, A Structured Programming Approach to Data* Andrew J. T. Colin, Fundamentals ofComputer Science Andrew J. T. Colin, Programming and Problem-solving in Algol 68* S. M. Deen, Fundamentals of Data Base Systems* J. B. Gosling, Design of Arithmetic Units for Digital Computers David Hopkin and Barbara Moss, Automata* Roger Hutty, Fortran for Students H. Kopetz, Software Reliability A. Learner and A. J. Powell, An Introduction to Algol 68 through Problems* A. M. Lister, Fundamentals of Operating Systems, second edition* Brian Meek, Fortran, PLII and the Algols Derrick Morris and Roland N. Ibbett, The MUS Computer System John Race, Case Studies in Systems Analysis
I. R. Wilson and A. M. Addyman, A Practical Introduction to Pascal
* The tities marked with an asterisk were prepared during the Consulting Editorship of Professor J. S. Rohl, University ofWestern Australia.
Design of Arithmetic Units for Digital Computers John B. Gosling Department of Computer Science, University of Manchester
M
© John B. Gosling 1980 All rights reserved. No part of this publication may be reproduced or transmitted, in any form or by any means, without permission. First published 1980 by THE MACMILLAN PRESS LTD London and Basingstoke Associated companies in Delhi Dublin Hong Kong Johannesburg Lagos Melboume New York Singapore and Tokyo
ISBN 978-0-333-26398-3 ISBN 978-1-349-16397-7 (eBook) DOI 10.1007/978-1-349-16397-7
This book is sold subject to the standard conditions of the Net Book Agreement. The paperback edition of this book is sold subject to the condition that it shall not, by way of trade or otherwise, be lent, resold, hired out, or otherwise circulated without the publisher's prior consent in any form of binding or cover other than that in which it is pubiished and without a similar condition including this condition being imposed on the subsequent purchaser.
Contents
Pre/ace 1
Preliminary Notes 1.1
1.2 1.3
1.4 1.5
2
3
ix
Introduction Assumptions Terminology and Conventions Number Formats Cost and Time
Addition
1 2 2 4 4 6
2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8
Basic Addition The Seria! Adder The Se rial-Parallel Adder Carry-look-ahead Principle The Block-carry adder The Conditional-sum Adder Combined Carry-look-ahead-Conditional-sum Adder A Comparison of Adders Problems
6 8 9 10 11 15 17 18 19
Multiplication
22
3.1 3.2 3.3 3.4 3.5 3.6
22 24 29 31 33 34 36
Basic Multiplication Speed Improvement The Simultaneous Multiplier A 'Twin-beat' Technique The 'Split' Multiplier A Comparison of Multipliers Problems
Contents
vi 4
5
6
7
8
Negative Numbers and Their Effect on Arithmetic
39
4.1 Introduction 4.2 Representations of Signed Numbers 4.3 Comparison of the Three Representations Problems
39 40 51 53
Division
55
5.1 Basic Division 5.2 Signed Division 5.3 Non-restoring Division 5.4 The Use of Redundancy 5.5 2-Bit-at-a-Time Division 5.6 Iterative Methods of Division 5.7 A Comparison of some Divider Units Problems
55 58 59 62 64 66 71 73
Floating-point Operation
74
6.1 Floating-point Notation 6.2 Floating-point Addition 6.3 Subtraction and Addition of Signed Numbers 6.4 Normalisation 6.5 Multiplication and Division 6.6 Mathematical Considerations 6.7 Round