## introduction

**Have you seen this while downloading something from the Internet?**

– XX** Mbps** (Mega bit per second)

– XX** Kb/s** (Kilo bit per second)

– XX** MB/s** (Megabytes per second)

– XX** Ko/s** (Kilo-bytes per second)

**The questions you ask yourself:**

What are these values? At a** transmission spee**d!

— A transmission speed of what? B**it** and **Octe**t!!

A **Bit** is a 0 value **o**r a value to 1!** **Kind of like Matrix 😉

The wor**d B**it comes from t**he word** binary (binary – 2 possible values)!

A binary code 00101001010101010101001010101010100001011010101111001010101010100101111010010010010100100100100100100101110010010101010100100100100101010110010100101010101001010101001010

An** Oct**et is an 8-bit **group**.

**1 byte
1001 0101**

## Situational setting

Serge wants to download a file to our server.

**Our server:**

Wants to send a file to Serge

Will therefore transform this file into 0 and 1

**serg**e:

– – Will receive eight thousand 0 and 1 to the second

Will therefore have a download speed of 8,000 b/s, or **8 kb/s.**

Knowing t**hat 1 byte – **8 bits, we can also say that its download speed is 1** ko/s.**

## What does our computer do with these 0s and 1s?

Our computer will send th**e**se 0s and 1s to a program in your computer:

We're in the 80s

We have a minitel at home (green and black screen)

The bits received relate to the display of our minitel

**So we get this code:**

**Our minitel knows that:**

– if the code is 0 – the bulb will be off, so black

– if the code is 1 – the bulb will be lit, so green

**What gives us:**

**We do a little cleaning and we get:**

A smiley 🙂

Technology has come a long way, but the principle remains the same!

## How to transmit 0s and 1s?

There are several ways to connect to the Internet:

– **WiFi**.

– **3G**/**4G**.

– **network cable**

So we have two types of networks:

– **wireless network**

– **network with wire**

In both cases, our information is sent via:

– an electri**cal signal**

– a lumino**us ignal**

– ra**dio waves**

**The question is:**

How do I send** bi**ts via electricity or light signals? With or not a signal !!!!!

Take the case of the electric signal with the RJ45 cables:

We can see that an RJ45 ca**ble **(called internet cable in supermarkets) is composed of 8 small electrical wires! These 8 electrical wires are set with a small scrap ring to make contact with the pinouilles of your network card:

Ok! So we have eight wires to send our 0s and 1s. These electrical wires support the 5v.

– value 0** **– 0 volt on the electrical wire

– value **1** – 5 volts on the electric wire

**What gives us:**

But how do you know when you're moving from one state to another? Thanks t**o a clo**ck!

Our equipment will say:

**PC **A:* Hi PC B, to exchange information, does it tell you that we send a binary value every 2 microseconds?*

**PC **B: *Hi PC A, listen no problem! We synchronize our watches and let's go 🙂*

**What gives us:**

**Which gives us the answers:**

Co**mputers exchange information **via 0s and 1s

H**ow do they** exchange 0s and 1s

There is only one question left to answer:

**What do these 0s and 1s mea**n?

To answer this question, we'll see:

– the deci**mal code**

– binar**y code**

– hexade**cimal code**

### The decimal code

The decimal code** is our way of counting every day**:

– we have 1**0 digits: **0, 1, 2, 3, 4, 5, 6, 7, 8 and 9

– this code is called** Deci**mal (decimal – ten)

– there are **10** in** 1**0!

Example: 34,512

**34,512** – **3** x 10^{4} – **4** x 10^{3} – **5** x 10^{2} – **1** x 10^{1} – **2** x 10^{0}

**34,512** – **3** x 10,000 – **4** x 1,000 – **5** x 100 – **1** x 10 – **2** x 1

### Binary code

Binary code is t**he way to count for our computer**s:

– we have **2 digits:** 0 and 1

– this code is calle**d **Binary (bi – two)

– we count **2** in** 2!**

In decimal place, we count like this: 1,** **2,** **3,** **4,** **5**,** 6**,** 7**,** 8**,** 9**,** 1**0**, **11**, **12**, **13** etc.

In binary, we count like this: 0, 1,** **10**,** 1**1,** **10**0,** 1**01**, 1**10**, **11**1, **1**000,** 1**001**, etc.

**How do I understand this code?**

In decimal place, what happens when you go from number **9** to number** 1**0?

When we've gone through our available numbers, we're doing 1 to the number on the left.

We agree that the number 9 c**a**n be written like this:

– **9**

– 0**9**

If we want to continue counting, then all we need to do is:

– to start again on the most reliable figure: **0**

– to make a **1 **on the digit to his left

For binary code, exactly the same thing happens!

**00** – 0000

**01** – 0001

**02** – 0010

**03** – 0011

**04** – 0100

**05** – 0101

**Ect.**

**Basic exercise:**

Find the decimal value of binary code **1111**.

**Advanced exercise: **

Find the decimal value of binary code **1011 0001.**

( 1** x** 27^{ )} ( 0 x** 2**6 )^{ –} ( 1 **x** 25 ^{) }– ( 1 **x **24 ^{) }– ( 0 x 23^{ )} – ( 0** x** 22^{ )} – ( **0 **x 2^{1 }) – ( **1 **x 2^{0 })

(1 **x** 27^{ )} ( 1 **x** 25^{ }) ( 1** x** 2^{4 }) ( 1** x** 2^{0 })

(1 **x** 128 ) ( 1** **x 32 ) ( 1** x** 16 ) ( 1** **x 1 )

128 – 32 – 16 – 1

1**77**

Binary value** 1011 **0001 is decimal value 1**77.**

### Hexadecimal value

Hexa – 6

Deca – 10

Hexadecimal – B**ase 16**

There are 16** **in **16**

16** p**ossible values – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F

## AND VOILA!

*Hoping to have been able to help you!*

*Don't hesitate if you have any questions or if you have any information to bring.*

FingerInTheNet