0% found this document useful (0 votes)
19 views19 pages

Ch1 Binary Numbers Part 1

The document discusses different number systems including binary, octal, and hexadecimal. It explains that numbers can be represented in any numeric base and describes how this works using base 10 examples. The key aspects covered are that computers use binary to represent on/off states and we can represent all numbers in any base using positional notation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views19 pages

Ch1 Binary Numbers Part 1

The document discusses different number systems including binary, octal, and hexadecimal. It explains that numbers can be represented in any numeric base and describes how this works using base 10 examples. The key aspects covered are that computers use binary to represent on/off states and we can represent all numbers in any base using positional notation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Binary values and number systems

Chapter 2

1
` Logic:
A statement is either True or False
Often represented by a T or F.
` Electrical Circuits:
A lamp will be On or Off
A circuit can have current flow or no flow (switch on or
off)
` Polarity:
Positive or negative.

` Binary – composed of, relating to, or involving 2.

2
How many ones make up 642???
600 + 40 + 2 ?
i.e. 6 hundreds, 4 tens, and 2 ones
6x102 + 4x101 + 2x100
What would it mean if we counted in
eights?
6x82 + 4x81 + 2x80
Then it would mean 418 counting in tens.

3
642 in base 10 positional notation is:

6 x 102 = 6 x 100 = 600


+ 4 x 101 = 4 x 10 = 40
+ 2 x 10º = 2x1 =2 = 642 in base 10

The power indicates


This number is in the position of
base 10 the number
4 6
` 6 hundreds and 4 tens and 2 ones is the
representation of this number in BASE 10.

` The base of a number determines the


number of digits and the value of digit
positions.

` What is special about 10?

5
R is the base
of the number
As a formula:

dn * Rn-1 + dn-1 * Rn-2 + ... + d2 * R + d1

n is the number of d is the digit in the


digits in the number ith position
in the number

642 is 63 * 102 + 42 * 10 + 21

7
6
` Can you show that this representation must
always be unique?

7
` Binary numbers are numbers where
the BASE IS 2
` This means there can only be two digits 0 and
1 (Why?)
` Counting in Binary:
0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001
and so on...
` Why does Base 2 interest us so much?

8
` Octal is where we use BASE 8
` The digits are then 0, 1, 2, 3, 4, 5, 6, 7

` Hexadecimal is where we use BASE 16


` The digits are then 0, 1, 2,3, 4, 5, 6, 7, 8, 9,
A, B, C, D, E, F

9
10
` What is 1010 (as a base 10 number) if the
base is 2, 8, 10 and 16?
` 10
` 520
` 1010
` 4112

11
1. Computers represent data in binary code:
off/on, false/true, 0/1;
2. Thus we would like to represent numbers in
such a format;
3. We can represent numbers in any base. We
are used to base 10 but this is habit; it is not
driven by mathematics;
E.g. 642 is 63 * 102 + 42 * 10 + 21
4. In base R the number dn dn-1 … d2 d1 means:
dn * Rn-1 + dn-1 * Rn-2 + ... + d2 * R + d1
5. Arithmetic works in any base exactly as in base 10.

12
R is the base
of the number
As a formula:

dn * Rn-1 + dn-1 * Rn-2 + ... + d2 * R + d1

n is the number of 64210 d is the digit in the


digits in the number ith position
is in the number

1202
642 = 164*8*3 10
+ 22 +*842 +*010 1 1+ +22
*8
3 3 2 2 11

110091807060504031201 7
13
Addition in Base 2:
We want to add the two numbers

1010111 and
1001011

14
Remember that there are only 2 digits in binary,
0 and 1

1 + 1 is 0 with a carry

Carry Values
1011111
1010111
+1 0 0 1 0 1 1
10100010

15 14
` Let’s take 111011 away from 1010111.

16
Remember borrowing? Apply that concept
here:

12
202
1010111
- 111011
0011100

17
Mark groups of three (from right)
This is because three binary digits exactly
represent the octal digits 0, 1, 2, 3, 4, 5, 6, 7
i.e. 000, 001, 010, 011, 100, 101, 110, 111
Example: Convert 10101011 to octal

010 101 011


2 5 3
10101011 in base 2 is 253 in base 8

18
Mark groups of four (from right)
This is because each group of four binary
digits represents one hexadecimal digit

Example: Convert 10101011(binary) to hex.


1010 1011
A B
10101011 is AB in base 16

19

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy