diff --git a/input/chapter01/chapter01.xml b/input/chapter01/chapter01.xml
index 252a2cdb..0161c39e 100644
--- a/input/chapter01/chapter01.xml
+++ b/input/chapter01/chapter01.xml
@@ -503,23 +503,18 @@
Boolean Operations
- George Boole was a mathematician who discovered a whole
- area of mathematics called Boolean
- Algebra. Whilst he made his discoveries in the mid
- 1800's, his mathematics are the fundamentals of all computer
- science. Boolean algebra is a wide ranging topic, we present
- here only the bare minimum to get you started.
- Boolean operations simply take a particular input and
- produce a particular output following a rule. For example,
- the simplest boolean operation,
- not simply inverts the value
- of the input operand. Other operands usually take two inputs,
+ George Boole was a mathematician whose work on set theory
+ is now called Boolean
+ Algebra.
+ The simplest boolean operation,
+ not inverts the value
+ of the input. Other operands take two inputs,
and produce a single output.
The fundamental Boolean operations used in computer
- science are easy to remember and listed below. We represent
- them below with truth tables; they simply
+ science are listed below. We represent
+ them below with truth tables; these
show all possible inputs and outputs. The term
- true simply reflects
+ true is
1 in binary.
@@ -527,7 +522,7 @@
Usually represented by
!,
- not simply inverts the
+ not inverts the
value, so 0 becomes
1 and
1 becomes
@@ -568,7 +563,7 @@
And
- To remember how the and operation
+ To remember how the and operation
works think of it as "if one input and
the other are true, result is true
@@ -863,16 +858,13 @@
Hexadecimal refers to a base 16 number system. We use
this in computer science for only one reason, it makes it easy
for humans to think about binary numbers. Computers only ever
- deal in binary and hexadecimal is simply a shortcut for us
+ deal in binary; hexadecimal is a shortcut for us
humans trying to work with the computer.
So why base 16? Well, the most natural choice is base 10,
since we are used to thinking in base 10 from our every day
number system. But base 10 does not work well with binary -- to
represent 10 different elements in binary, we need four bits.
- Four bits, however, gives us sixteen possible combinations. So
- we can either take the very tricky road of trying to convert
- between base 10 and binary, or take the easy road and make up a
- base 16 number system -- hexadecimal!
+ Four bits, however, gives us sixteen possible combinations -- too many.
Hexadecimal uses the standard base 10 numerals, but adds
A B C D E F which refer to
10 11 12 13 14 15 (n.b. we
@@ -1081,10 +1073,10 @@
(say, assign G to the value 16), but 16 values is an excellent
trade off between the vagaries of human memory and the number of
bits used by a computer (occasionally you will also see base 8
- used, for example for file permissions under UNIX). We simply
+ used, for example for file permissions under UNIX). We
represent larger numbers of bits with more numerals. For
example, a sixteen bit variable can be represented by 0xAB12,
- and to find it in binary simply take each individual numeral,
+ and to find it in binary take each individual numeral,
convert it as per the table and join them all together (so
0xAB12 ends up as the 16-bit
binary number
@@ -1665,9 +1657,9 @@
Sign Bit
- The most straight forward method is to simply say that
- one bit of the number indicates either a negative or
- positive value depending on it being set or not.
+ The most straight forward method is to let
+ one bit indicates negative or
+ positive.
This is analogous to mathematical approach of having a
+ and
-. This is fairly logical,
@@ -1677,7 +1669,7 @@
easier.
However, notice that the value
0 now has two equivalent
- values; one with the sign bit set and one without.
+ values: one with the sign bit set and one without.
Sometimes these values are referred to as
+0 and
-0 respectively.
@@ -1686,16 +1678,15 @@
One's Complement
- One's complement simply applies the
- not operation to the positive number to
- represent the negative number. So, for example the value
+ One's complement applies the
+ not operation to a positive number to
+ represent its negative. So, for example the value
-90 (-0x5A) is represented by ~01011010 =
10100101The
~ operator is the C
language operator to apply
NOT to the value. It is
- also occasionally called the one's complement operator, for
- obvious reasons now!
+ also occasionally called the one's complement operator.
With this scheme the biggest advantage is that to add
a negative number to a positive number no special logic is
required, except that any additional carry left over must be