Docsity

Introduction to Computing: Bits, Data Types, and Operations - Prof. Orly Alter, Quizzes of Biology

Partial preview of the text

Download Introduction to Computing: Bits, Data Types, and Operations - Prof. Orly Alter and more Quizzes Biology in PDF only on Docsity!

Quiz

• Our ability to abstract must be combined

with our ability to ___

• Does ISA (specification) belong to

hardware or software?

• Is human brain a “universal computing

device”?

• Given a flash light, can you “text

message”? If yes, how?

Chapter 2

Bits, Data Types, and Operations

Analog vs. Digital

Modern computers are digital devices

V(t)

time

V(t)

time

Analog Digital

v H(t)

v L(t)

Continuous vs. Discrete

The Visible Spectrum The Hydrogen Line

Spectrum

Numbering systems

  • Binary (0 and 1, also known as “base two”, uses two digits)
  • Decimal (arabic, 0,1,2,3,4,5,6,7,8,9, uses ten digits)
  • Hexadecimal (0,1,…,8,9,A,B,C,D,E,F, uses sixteen digits)
  • The highest digit in base N is N- the highest single digit in base ten is 9 the highest single digit in base two is 1 the highest single “digit” in hexadecimal system is “F”
  • In all number systems zero is first digit

Numbering Systems

Decimal Hex (Hexadecimal) Binary 0 1 2 3 4 5 6 7 8 9

• Decimal – base 10

• Hex – base 16

• Binary – base 2

Numbering Systems

Decimal Hex (Hexadecimal) Binary 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 11 12 13 14 15 16

• Decimal – base 10

• Hex – base 16

• Binary – base 2

Numbering Systems

Decimal Hex (Hexadecimal) Binary 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 A 11 B 12 C 13 D 14 E 15 F 16

• Decimal – base 10

• Hex – base 16

• Binary – base 2

Numbering Systems

Decimal Hex (Hexadecimal) Binary 0 0 0 1 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 A 11 B 12 C 13 D 14 E 15 F 16 10

• Decimal – base 10

• Hex – base 16

• Binary – base 2

Numbering Systems

Decimal Hex (Hexadecimal) Binary 0 0 0 1 1 1 2 2 10 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 A 11 B 12 C 13 D 14 E 15 F 16 10

• Decimal – base 10

• Hex – base 16

• Binary – base 2

Numbering Systems

Decimal Hex (Hexadecimal) Binary 0 0 0 1 1 1 2 2 10 3 3 11 4 4 100 5 5 101 6 6 110 7 7 111 8 8 1000 9 9 1001 10 A 1010 11 B 1011 12 C 1100 13 D 1101 14 E 1110 15 F 1111 16 10 10000

• Decimal – base 10

• Hex – base 16

• Binary – base 2

Numbering Systems

• How do you represent 13 or 3,453?

#13 = 1x10 1 + 3x10 0

#3453 = 3x10 3 + 4x10 2 + 5x10 1 + 3x10 0

10 5 10 4 10 3 10 2 10 1 10 0

100,000 10,000 1,000 100 10 1

1 3

3 4 5 3

Weighted positional notation: decimal (base 10)

EXERCISES

What is the decimal value of the following numbers

Adding Integers