Non-FictionInformativeEducational
Computer Engineer eBook
A Coursebook on Computer Engineer
A Coursebook on Computer Engineer
Formats
Free sample
Chapter 1: The Hundred-Million-Dollar Bit--–- On February 4, 1996, the maiden flight of the Ariane 5 rocket ended in a fireball that cost the European Space Agency $370 million. The cause? Not a faulty booster, not a navigation error, not a terrorist attack. The cause was a single number that was too large to fit into a box.The rocket’s inertial navigation system attempted to convert a 64-bit floating-point number into a 16-bit signed integer. The value was too big—it exceeded the maximum representable number by a small margin.
The conversion triggered an overflow exception. The software, believing this error indicated a catastrophic hardware failure, shut down the active guidance system. A backup system, running the same flawed code, shut down 50 milliseconds later. The rocket, now flying blind, veered off course and self-destructed.Four hundred and seventy million dollars. Wasted.
Because someone didn’t understand how computers represent numbers.You are about to learn why that happened. More importantly, you are about to learn how to never let it happen to you.The Great Analogy Lie Before we write a single line of code or flip a single logic gate, we need to confront a lie you have been told your entire life. The lie is this: computers work with the same numbers you learned in elementary school.In mathematics, the number 42 is infinite. It exists perfectly and abstractly. You can add 42 to 42 forever and never run out of 42.
You can divide 42 by 3 and get exactly 14. You can take the square root of 42 and get an irrational number that extends to infinity—but mathematically, that infinite decimal is still exactly the square root of 42.Computers cannot do any of this. Not really.A computer has a finite number of transistors. Those transistors can be on or off—1 or 0. That’s it.
Every number, every letter, every pixel on your screen, every sound in your headphones, every frame of every movie you have ever streamed is represented by a finite sequence of these 1s and 0s.This chapter is about the bridge between the infinite world of mathematics and the brutally finite world of transistors. Master this bridge, and you will understand why the Ariane 5 exploded, why your calculator sometimes says “0.1 + 0.2 = 0.30000000000000004”, and why every computer engineer needs to think differently about numbers.Why Analog Won: The Noisiness of Reality Let us start with a more basic question: why digital at all? Why do we force everything into 1s and 0s? Why not use the smooth, continuous voltages that nature provides?Consider a simple light switch. If the switch is off, the light is off.
If the switch is on, the light is on. You could theoretically design a system where the brightness of the light corresponded to the exact voltage coming from a dial—50% voltage meant half brightness, 73% voltage meant 73% brightness. That is analog computing.There is a problem: noise.Every wire is an antenna. Every signal picks up electromagnetic radiation from power lines, radio stations, nearby computers, and even cosmic background radiation. In an analog system, a voltage that was supposed to be 1.000 volts might arrive as 1.073 volts.
That 73-millivolt error becomes a 7.3% error in your calculation. Over many operations, these errors accumulate. Your computation drifts.Digital systems solve this by abandoning precision in favor of categories. Instead of “what voltage is this?” the computer asks a much simpler question: “Is this voltage above 2.5 volts or below 2.5 volts?” If the signal is supposed to represent a 1 (typically 3.3V or 5V), it might arrive as 3.1V or 2.9V or 4.2V. As long as it stays above the threshold, the computer correctly interprets it as a 1.
Noise is rejected, not amplified.Micro-lab 1.1: Take a standard LED and a 9V battery. Wire the LED through a 330-ohm resistor. Now slowly turn the battery connection on and off. Notice there is a threshold voltage below which the LED does not light. That threshold is your digital boundary.
Below it is 0; above it is 1.This rejection of noise is the foundational insight of computer engineering. We sacrifice infinite precision for perfect reliability.The Building Blocks: Bits, Bytes, and Words A single 1 or 0 is called a bit—short for “binary digit.” One bit can represent two states: true/false, on/off, yes/no.One bit is too small for most purposes. If you only had one bit to represent a number, you could only represent 0 and 1. Add another bit, and you have four combinations: 00, 01, 10, 11. Add a third bit, and you have eight combinations.The pattern is simple: n bits give you 2ⁿ possible values.8 bits are called a byte.
A byte can represent 256 different values—enough for all uppercase and lowercase letters, digits, punctuation, and some special control characters.16 bits are called a word on many older architectures, though on modern 64-bit systems, a word is 64 bits. Do not get too attached to these terms; different processor families use different naming conventions. What matters is the underlying mathematics.Micro-lab 1.2: Using only your fingers (10 bits), how many distinct patterns can you make? 1024. That is why 1 kilobyte is 1024 bytes, not 1000.
Engineers chose the closest power of two.The Binary Number System You learned the decimal system when you were a child, but you probably never stopped to analyze how it works. The decimal number 3,742 means:(3 × 10³) + (7 × 10²) + (4 × 10¹) + (2 × 10⁰)The position of each digit tells you which power of 10 to multiply by. The rightmost position is 10⁰ (ones). Moving left increases the exponent.Binary works exactly the same way, except the base is 2 instead of 10. The binary number 1011 means:(1 × 2³) + (0 × 2²) + (1 × 2¹) + (1 × 2⁰) = 8 + 0 + 2 + 1 = 11 in decimal.Let’s convert a few numbers to build intuition.
The decimal number 42 in binary:42 ÷ 2 = 21 remainder 021 ÷ 2 = 10 remainder 110 ÷ 2 = 5 remainder 05 ÷ 2 = 2 remainder 12 ÷ 2 = 1 remainder 01 ÷ 2 = 0 remainder 1Read the remainders from bottom to top: 101010. That is 42 in binary. Notice the pattern: 32 + 8 + 2 = 42. Binary is just a compact way of writing which powers of two you are adding together.Micro-lab 1.3: Convert the decimal number 100 to binary. Answer: 1100100.
Check: 64 + 32 + 4 = 100.Why Hexadecimal Matters Binary is the language of the machine, but it is terrible for human communication. Try to compare two 32-bit binary numbers visually. It hurts.Hexadecimal (base 16) solves this problem by grouping binary digits into clusters of four. Four bits can represent 16 values (0–15). We borrow the letters A through F to represent the values 10 through 15.Each hexadecimal digit corresponds exactly to four binary digits:0000 = 00001 = 10010 = 20011 = 30100 = 40101 = 50110 = 60111 = 71000 = 81001 = 91010 = A1011 = B1100 = C1101 = D1110 = E1111 = FThe 32-bit binary number 10101010101010101010101010101010 becomes the much more readable 0x AAAAAAAA.
The “0x” prefix is the standard way to indicate a hexadecimal number in most programming languages.Octal (base 8) groups bits in threes and appears occasionally in legacy systems (Unix file permissions being the most notable example: chmod 755). We will focus on binary and hexadecimal, as these are the two number systems you will actually use.The Problem of Negative Numbers We have a problem. We have only 1s and 0s. How do we represent negative numbers? There is no minus sign in hardware.Several approaches were attempted in early computing, and each failed in a different way.Sign-magnitude: Reserve the leftmost bit to indicate sign (0 for positive, 1 for negative).
The remaining bits represent the absolute value. This seems obvious. But it has two representations for zero (00000000 and 10000000 are both zero), which breaks the fundamental mathematical property that zero should equal itself. Worse…
This is the end of the free sample. Get the eBook to keep going. Buy now
About this book
Details
- Author
- Pettit Harland
- Publisher
- SamEnrico
- Language
- English
- Genre
- Non-Fiction, Informative, Educational
- Released
- 2026-05-08
- Pages (approx.)
- 135
- Available as
- eBook, Audiobook
Read better in the ZLOADR app
Your eBooks on your phone or tablet. Sign in with your SamEnrico account and start reading.
More by Pettit Harland
Dreams After Car Accident TraumaPettit Harland$11.99
Digital Body Language PrimerPettit Harland$11.99
Accountability Software For Recovery GuidePettit Harland$11.99
PMS And Relationships GuidePettit Harland$11.99
Dream Movement Therapy for TraumaPettit Harland$11.99
The Secret of the Aral Sea: How Soviet Scientists Unlocked Nuclear PowerPettit Harland$11.99
Neon Ghosts of the UndergroundPettit Harland$11.99
Community Solar Growth ForecastPettit Harland$12.99
Proctoring Software User's ManualPettit Harland$12.99
Understanding Heart Defect Tongue Hamartoma PolysyndactylyPettit Harland$17.99
How to Start a Brush for Cosmetics Business (Beginners Guide)Pettit Harland$11.99You may also like
Hong Kong Handover 1997Dunn Johnnie$11.99
Zumba For Postnatal Recovery CourseNeal Christian$11.99
Zumba for BeginnersLadner Nikia$11.99
YouTube Comment Mining GuideHumes Pandora$12.99
Worry Box MeditationCarlin Rudy$11.99
Workplace Stress MeditationNguyen Lynn$11.99
Workplace Stress and Sleep RepairHawley Ivory$11.99
Workplace Perfectionism CureDelaney Jeffry$11.99
Workplace Injustice Anger GuideWallen Isabelle$11.99
Work Addiction and Burnout LinkGreenwood Ester$11.99
Women in Yoga and WellnessBeattie Galina$11.99
Women in Stand Up ComedyChun Evangeline$11.99