The Binary Book is an electronic book that is roughly equivalent in size to a 100-page printed book. I am distributing it as a compiled HTML (CHM) help file, complete with a table of contents (see below), index and full-text search capability.
The Binary Book sells for $12.95. To purchase by credit card through PayPal, click the PayPal image below. I will email the book to you (the file is about 600KB) as soon as I am able, which is generally within 24 hours of purchase.
This book delves into three areas of importance to programmers, areas that are all too often neglected.
The Binary Book
About the Author
Introduction
Part I - Bit Manipulation
Chapter 1 - Binary Strings
Binary Strings
Why Binary
Lots of Bytes
A Byte of Confusion
Interpreting Binary Strings
Binary Strings As Characters-Character Codes
ASCII
ANSI
DBCS
Unicode
Unicode Support Under Windows
Binary Strings as Instructions
Binary Strings as Memory Addresses
A Quick Peek at Memory
Big Endian and Little Endian
Chapter 2 - Binary and Hexadecimal Number Formats
Decimal Format
Binary Format
Some Useful Functions
Visual Basic
Visual C++
What's Wrong with the Binary Format
Octal Format
Converting Between Octal and Binary
Hexadecimal Format
Converting Between Hexadecimal and Binary
Chapter 3 - Bitwise Manipulations
Flags
A Visual Basic Example
A Visual C++ Example
Bitwise Operators
The Basic Bitwise Operators
Two More Bitwise Operators
Bitwise Manipulations
Examples
Example 1 - Clearing Bits in a Flag
Example 2 - Setting Bits in a Flag
Example 3 - Reversing Bits in a Flag
Example 4 - Retrieving the Value of a Bit in a Flag
Summary
Using Symbolic Constants with Bit Flags
A Visual Basic Example
A Visual C++ Example
Part II - Data Types
Chapter 4 - Preliminaries
Variables
Name
Address
Type
Value
Variable Scope
Variable Lifetime
Static Variables
Pointers
By Indirections Find Directions Out
Pointers in Visual Basic
CopyMemory - A VB Hackers Dream
A Simple Example
A More Interesting Example
Chapter 5 - Data Types
What is a Data Type
An Example-Integer Data Types
The VC++ Unsigned Integer Data Type
The VC++ Integer Data Type
The Visual Basic Integer Data Type
Groups of Data Types
Fundamental and Derived Data Types
Chapter 6 - Visual Basic Data Types
Variants
User-Defined Types
Chapter 7 - Basic VC++ Data Types
TypeDefs
Char Data Types
Unicode Character Types
Int Data Types
Floating Point Data Types
Other Data Types
Void
FARPROC
HANDLE
Boolean Data Types
Summary
Chapter 8 - Signed and Unsigned Integer Data Types
Signed and Unsigned Representations
Why Two Different Representations
Unsigned Representation
Signed Representation
The Signed-Magnitude Representation
The Two's Complement Representation
Why Is It Called Two's Complement
Translating Between Signed and Unsigned Representations
Integers
Longs
Bytes
Examples
Converting Between Word Lengths
Chapter 9 - Floating Point Data Types
Binary Expansions
IEEE Floating Point Numbers
Displaying Binary Expansions
Chapter 10 - Strings
The BSTR
VC++ Strings
VarPtr and StrPtr
Part III - Logic
Chapter 11 - Statements and Connectives
Statements and Connectives
Simple and Compound Statements
Logical Statements and Programming Statements
Truth Values
Symbolic Form
The Connectives
Negation
Conjunction
Disjunction
Exclusive Or
Nand and Nor
The Conditional
The Biconditional
Chapter 12 - Truth Tables
Tautologies and Contradictions
Chapter 13 - Logical Equivalence
DeMorgan's Laws
The Converse of a Statement