Skip to Content
Absolute Beginner's Guide to Programming, Third Edition
book

Absolute Beginner's Guide to Programming, Third Edition

by Greg Perry
November 2002
Beginner content levelBeginner
432 pages
11h 44m
English
Que
Content preview from Absolute Beginner's Guide to Programming, Third Edition

Binary Arithmetic

At their lowest level, computers cannot subtract, multiply, or divide. Neither can calculators. The world's largest and fastest supercomputer can only add—that's it. It performs the addition at the bit level. Binary arithmetic is the only means by which any electronic digital computing machine can perform arithmetic.

Suppose you want the computer to add seven 6s together. If you asked the computer (through programming) to perform the calculation

6 + 6 + 6 + 6 + 6 + 6 + 6

the computer would zing the answer, 42, back to you before you could say bit bucket. The computer has no problem performing addition. The problems arise when you request that the computer perform another type of calculation, such as this one:

42 – 6 – 6 – 6 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Absolute Beginner's Guide to Programming, Second Edition

Absolute Beginner's Guide to Programming, Second Edition

Greg Perry

Publisher Resources

ISBN: 0789729059Purchase book