CS 2110: Binary, Data Types, and Logic Circuits Review

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/59

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 9:49 PM on 8/30/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

60 Terms

1
New cards

Decimal

our 'normal' number counting system (base 10)

2
New cards

Binary

base 2

3
New cards

Octal

base 8

4
New cards

Hexadecimal

base 16

5
New cards

Unsigned Binary

Non-negative binary numbers

6
New cards

Signed Magnitude

We use the leftmost bit (MSB) to indicate the sign.

7
New cards

2's Complement

Most common type of representing positive and negative numbers in binary

8
New cards

2's complement addition

Adding two 2's complement numbers is the same process as adding two unsigned binary numbers.

9
New cards

Overflow

What if I don't have enough bits to store the output of my addition?

10
New cards

Sign Extension

The same number can be expressed with different word-lengths.

11
New cards

Binary to Decimal Conversion

Write down the binary number, list the powers of 2 underneath the numbers from right to left, and add all powers of 2 that are underneath a '1' binary number.

<p>Write down the binary number, list the powers of 2 underneath the numbers from right to left, and add all powers of 2 that are underneath a '1' binary number.</p>
12
New cards

Detecting Overflow

For 2's complement addition, there are two ways of detecting overflow: 1. Adding two numbers with the same sign resulting in a number of the opposite sign. 2. If the carry in and carry out of the last bit are different.

13
New cards

Additive Inverse in 2's Complement

To find the additive inverse of a number using 2's complement, you flip the bits and add 1.

14
New cards

Binary Subtraction

Binary subtraction can now be done by performing binary addition but with the 2's complement of the number to subtract.

15
New cards

Leading Zeroes in Sign Extension

To sign-extend an unsigned binary number, you need to add leading zeroes to the beginning of the number.

16
New cards

Appending Sign Bit in Sign Extension

To sign extend a 2's complement binary number, you need to append the sign bit to the most significant bit (left) end.

17
New cards

Carry Out in Unsigned Addition

For unsigned binary addition, there is overflow if there is a carry out bit.

18
New cards

Carry In and Carry Out

If the carry in and carry out of the last bit are different, overflow occurs.

19
New cards

Two Representations for Zero

There are two representations for zero: '0000' (+0) and '1000' (-0).

20
New cards

Typical Arithmetic Issues

Typical arithmetic issues occur when operations yield incorrect results, such as 0110 (6) + 1001 (-1) = 1111 (-7), not -5.

21
New cards

Example of Unsigned Binary

Range of 4-bit binary -> [0, 24 - 1] = [0, 15]

22
New cards

Signed Magnitude Binary Range

[-2n-1 + 1, 2n-1 - 1]

23
New cards

2's Complement Binary Range

[-2n-1, 2n-1 - 1]

24
New cards

IEEE 754 Formula

(-1)^S * 1.M * 2^(E-127)

25
New cards

Normal numbers exponent range

Exponent range from -126 to +127, -127 and +128 are reserved for special cases.

26
New cards

NOT A

Syntax: Ā, ¬A, A', ~A, !A; 1 = true, 0 = false.

27
New cards

AND Operation

Syntax: AB, A&B, A•B, A∧B; A AND 0 = 0, A AND 1 = A.

28
New cards

OR Operation

Syntax: A+B, A∨B; A OR 0 = A, A OR 1 = 1.

29
New cards

XOR Operation

Syntax: A⊕B, A^B; A XOR 0 = A, A XOR 1 = 1.

30
New cards

Bitwise Boolean Operations

Performed between two binary numbers, resulting in logical operations between each respective bit.

31
New cards

Bit Vector

a series of bits that represent some number

32
New cards

Bit Mask

a bit vector that is applied to another bit vector (input) with a bitwise operation to transform the input

33
New cards

Bit Masking

AND can be used to clear a bit (A AND 0 = 0)

34
New cards

Bit Masking Example

EX: 1011012 AND 1111102 = 1011002

35
New cards

Bit Masking OR

OR can be used to set a bit (A OR 1 = 1)

36
New cards

Bit Masking OR Example

EX: 1011002 OR 0000012 = 1011012

37
New cards

Bit Masking XOR

XOR can be used to toggle a bit

38
New cards

Bit Masking XOR Example

EX: 0110002 XOR 0000012 = 0110012

39
New cards

NOT Operation

~A

40
New cards

De Morgan's Law

To simplify expressions using De Morgan's Law: Distribute the NOTs and identify any common rules/properties that can help simplify further

41
New cards

De Morgan's Law NOTing

NOTing an operator flips it: NOT(AND) = OR, NOT(OR) = AND

42
New cards

N-Type Transistors

Must be connected to ground; If supplied with an amount of volts > 0, we have a closed circuit, representing a logical 1.

43
New cards

P-Type Transistors

Must be connected to power; If supplied with an amount of volts > 0, we have an open circuit, representing a logical 0.

44
New cards

NOT Gate

Also called an inverter; Outputs the opposite of the input

45
New cards

NOR Gate

NOT (OR) Gate; For a NOR gate with n inputs, we use n P-type transistors and n N-type transistors.

<p>NOT (OR) Gate; For a NOR gate with n inputs, we use n P-type transistors and n N-type transistors.</p>
46
New cards

Common Properties/Rules

A + (B + C) = (A + B) + C, A * (B + C) = (A * B) + (A * C), A + (A * B) = A

47
New cards

Common Identities

A + 0 = A, A * 0 = 0, A * 1 = A, A * ~A = 0, A + ~A = 1

48
New cards

N-Type vs P-Type Comparison

They have the opposite effect; notice the bubble!

49
New cards

OR Gate

ORs two inputs

50
New cards

OR Gate Transistors

For an OR gate with n inputs, we use: n + 1 P-type transistors, n + 1 N-type transistors

51
New cards

NAND Gate

NOT (AND) Gate

<p>NOT (AND) Gate</p>
52
New cards

NAND Gate Transistors

For a NAND gate with n inputs, we use: n P-type transistors, n N-type transistors

53
New cards

AND Gate

ANDs two inputs

54
New cards

AND Gate Transistors

For an AND gate with n inputs, we use: n + 1 P-type transistors, n + 1 N-type transistors

55
New cards

Decoder

Selects exactly one output based on which of the input bits are set

56
New cards

Decoder Outputs

If there are n selector bits, then there are 2n possible outputs

57
New cards

Multiplexer (MUX)

Selects between multiple inputs using a selector

<p>Selects between multiple inputs using a selector</p>
58
New cards

MUX Inputs

If there are 2n inputs, then there are n selector bits

59
New cards

1-bit adder

When adding two inputs, say A and B (1-bit binary numbers), we must consider the bits of those numbers, as well as any carry in bits.

60
New cards

1-bit adder Output

The output is both the sum and any carry out from the addition