CSE 102 Krumpe

Ace your homework & exams now with Quizwiz!

Prefixes to show number types:

• 0x for hexadecimal numbers • 0x10 means "hexadecimal 10" • 0b for binary numbers • 0b10 means "binary 10"

The base eight number 301 is equivalent to which decimal number? A. 4 B. 25 C. 49 D. 193

D. 193

Whatever we do on a computer...

...must be translated into corresponding zeros and ones • In fact, sometimes programmers switch to binary when performance is important.

In base four, what are the digits? A. 0, 1, 2, 3 B. 0, 1, 2, 3, 4 C. 1, 2, 3 D. 1, 2, 3, 4

A. 0, 1, 2, 3

Which of these binary numbers is an even number? A. 1011010 B. 011001101 C. 10001 D. 1101011111111111111

A. 1011010

In hexadecimal, what number comes right after 99? A. 9A B. A0 C. 100 D. 1AA

A. 9A

What are these? (m)

Microprocessors - even more integrated transistors. Used in "Fourth Generation" computers (70s through today)

Computers are:

On/off switches: LOTS of on/off switches "1/0" "Power/No Power"

AND, OR, XOR

• AND • Combines two inputs. Output is 1 if and only if both inputs are 1. • OR • Combines two inputs. Output is 1 if and only if at least one input is 1. • XOR • Combines two inputs. Output is 1 if and only if exactly one input is 1.

Operations on binary numbers:

• Adding • AND, OR, NOT, XOR • Shifting and rotating

Representing AND, OR, XOR

• As "truth tables" • As "circuits"

Binary versus Decimal

• Both are "positional number systems" • "positional" because the meaning of a digit depends on its position: • Each "4" in 5494 has a different meaning • Each "1" in 1011 has a different meaning • Decimal (base ten) has... • Ten digits • Place values that are powers of ten • Binary (base two) has... • Two digits • Place values that are powers of two

Hexadecimal is a nice alternative to binary...

• Converting between binary and hex is fairly simple: • Every 4 bits of a binary number can be converted to the corresponding hex digit • Example: 10111001011 • Group every 4 digits beginning at right: 101 1100 1011 • The hex equivalent is 5CB

Base sixteen (hexadecimal):

• Sixteen digits, 0 through F • Counting looks like this: • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10 • Place values are powers of sixteen

NOT

• Takes one input. Produces the opposite of that input.

Bitwise-AND

• Takes two "input bits" and combines them to produce one "output bit" • If both input bits are "1", the result is 1 • Otherwise, the result is 0 • Really the same as "Logical-AND", which combines two boolean values to produce one boolean value: • If both boolean values are TRUE, the result is TRUE • Otherwise, the result is false

Adding:

• Works just like adding in decimal. • Helps to know basic addition facts first: • 0 + 0 • 0 + 1 • 1 + 0 • 1 + 1 • 1 + 1 + 1

In hexadecimal, what number comes right before 100? A. 90 B. F0 C. FF D. 101

C. FF

The binary number 11010011101 is equal to the decimal number... A. 1246 B. 1717 C. 1798 D. 2010

B. 1717

In decimal, which whole number comes right before 100? A. 000 B. 99 C. 999 D. 473

B. 99

In hexadecimal, what number comes right after AF? A. A0 B. B0 C. BF D. AFF

B. B0

In Binary, what is 1 + 1 + 1? A. 1 B. 10 C. 11 D. 111

C. 11

In binary, which whole number comes right before binary 100? A. 000 B. 99 C. 11 D. 001

C. 11

The base four number 23 is equivalent to which decimal number? A. 5 B. 8 C. 11 D. 23

C. 11

Binary number 10 is equal to the decimal number... A. 0 B. 1 C. 2 D. 10 E. None of these

C. 2

Two views of AND

Table of values, Circuit View

What are these? (t)

Transistors - a type of on/off switch. Used in "Second Generation" computers (50s and 60s)

What are these? (v)

Vacuum tubes - a type of on/off switch. Used in "First Generation" computers (1940s and 1950s)

What is the decimal equivalent of hex FF? A. 99 B. 100 C. 255 D. 256 E. 1515

C. 255

The binary number 10000 is equal to the decimal number... A. 1 B. 2 C. 4 D. 8 E. 16 F. None of these

E. 16

The binary number 1101 is equal to the decimal number... A. 1101 B. 11 C. 12 D. 14 E. 15 F. None of these

F. None of these

What are these? (i)

Integrated Circuits - lots of integrated transistors. Used in "Third Generation" computers (60s and 70s)

Binary: Why learn it?

It is fundamental to how computers have always worked


Related study sets

Works: Of which works are the following statements true?

View Set

EAQ quiz 2 Nutrition, Therapeutic Communication, and Documentation

View Set

Unit 14: Types of Pooled Investments

View Set

Ch. 2 Review Questions (Bushong)

View Set

Hands-On Server 2019 Post-Assessment Quiz

View Set

Chapter 59: Nursing Management: Chronic Neurologic Problems, Leadership/Mgt, Level 4 Math, Critical Care, Burns, Peripheral Nerve & Spinal Cord Problems, Acute Intracrainal Problems, Chapter 28: Nursing Management: Lower Respiratory Problems, Chapter...

View Set