COMP 2131- Module 2- Data Representation & Boolean Logic

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/31

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

32 Terms

1
New cards

Word size?

-the number of bits processed by a computer's CPU in one go

-eg. typically 32 bits or 64 bits

-Data bus size, instruction size, address size are

usually multiples of the word size

2
New cards

What are two conventions to store the values?

Little endian byte order

-Intel-compatible machines

Eg.

Assume x has the value 0x1234567

0x103 0x102 0x101 0x100 address

0x01 0x23 0x45 0x67 value

Big endian byte order

-Machines from IBM and Sun Microsystems

0x103 0x102 0x101 0x100 address

0x67 0x45 0x23 0x01 value

3
New cards

What is the size of each integer type below?

-Char (unsigned char)

-Short (unsigned Short)

-Int (unsigned Int)

-Long (unsigned Long)

-Float

-Double

knowt flashcard image
4
New cards

What is the method for subtraction?

-1's complement

-2's complement

<p>-1's complement</p><p>-2's complement</p>
5
New cards

How are signed integers represented in binary?

-2's complement for negative integers

6
New cards

Weight (in terms of Binary number systems)

(base)^position

7
New cards

Magnitude (in terms of Binary number systems)

Sum of "bit x weight"

8
New cards

Nibble

4 bits

9
New cards

Byte

8 bits

10
New cards

Magnitude (in terms of Octal number systems)

sum of "digit x weight"

11
New cards

Decimal to any base?

-Divide by base

<p>-Divide by base</p>
12
New cards

How are fractional numbers represented in binary?

-Institute of Electrical and Electronics Engineers (IEEE) floating-point representation

-Need to represent F (fraction), E (exponent),

and sign

-IEEE 754 Floating-Point Standard (32-bits)

<p>-Institute of Electrical and Electronics Engineers (IEEE) floating-point representation</p><p>-Need to represent F (fraction), E (exponent),</p><p>and sign</p><p>-IEEE 754 Floating-Point Standard (32-bits)</p>
13
New cards

What are the three cases of single precision floating point values?

-Case 1 : Normalized Values

-Case 2 : Denormalized values

-Case 3 : Special values

14
New cards

Describe case 1: normalized values

-The bit pattern of exp is neither all zero nor all one

-In this case, the exponent field is interpreted as

representing a signed integer in biased form

-The exponent value is E= e - Bias,

-e is the unsigned number having bit representation

-bias is 127 for single precision and 1023 for

double

15
New cards

Describe case 2: de-normalized values

-The case where the exponent is all 0s, but the fraction is non-zero

<p>-The case where the exponent is all 0s, but the fraction is non-zero</p>
16
New cards

Describe case 3: special values

-When the exponent field is all

ones

-When the fraction field is all zeros

-The resulting values represent infinity

-Either +∞ when s = 0, or −∞ when s = 1

-When the fraction field is nonzero, the resulting value is called a "NaN" short for "Not a Number"

17
New cards

What does ASCII stand for and what is it?

-American Standard Code for Information

Interchange

-It uses 7-bits to represent:

• 94 Graphic printing characters

• 34 Non-printing characters

18
New cards

What are the two categories of logic blocks?

-Combinational Logic (eg. Adders and multiplexors)

-Sequential logic (eg. Counter)

19
New cards

What are combinational logic circuits?

-Logic blocks/ circuit without memory

-Output depends only on current input

-Combinational Logic Circuits are made up from basic logic NAND, NOR, NOT gates that are connected together to produce further switching circuits

<p>-Logic blocks/ circuit without memory</p><p>-Output depends only on current input</p><p>-Combinational Logic Circuits are made up from basic logic NAND, NOR, NOT gates that are connected together to produce further switching circuits</p>
20
New cards

What are the three main ways of specifying the function of a combinational logic circuit?

1. Boolean Algebra - algebraic expression showing the operation of the logic circuit for each input variable either True or False that results in a logic "1" output.

2. Truth Tables - A table defines the function of a logic gate by providing all the inputs and output states in tabular form for each possible combination of input as in expression.

3. Logic Diagram - The graphical representation of a logic circuit showing wiring and connections of each individual logic gate

21
New cards

What is an asserted signal?

-A signal that is (logically) true, or 1

22
New cards

What is an deasserted signal?

-A signal that is (logically) false, or 0

23
New cards

What are sequential logic circuits/blocks?

-A group of logic elements that contain memory

-The outputs can depend on both the inputs and the value stored in memory

<p>-A group of logic elements that contain memory</p><p>-The outputs can depend on both the inputs and the value stored in memory</p>
24
New cards

What are the laws of Boolean algebra?

Identity law: A+ 0 =A and A · 1= A

Zero and One laws: A+ 1 = 1 and A · 0 = 0

Inverse laws: A+ NOTA= 1 and A · NOTA = 0

Commutative laws: A + B = B + A and A · B = B · A

Associative laws: A+ (B+C) = (A+B) +C

and A · (B · C) = (A · B) · C

Distributive laws: A · (B+C) = (A · B) + (A · C)

and A+ (B · C) = (A+B) · (A+C).

25
New cards

What is a decoder?

-A logic block that has an n-bit input and 2^n outputs, where only one output is asserted for each input combination

<p>-A logic block that has an n-bit input and 2^n outputs, where only one output is asserted for each input combination</p>
26
New cards

What is a multiplexor/selector?

-its output is one of the inputs that is selected by a control

-The selector (or control) value determines which of the inputs becomes an output

<p>-its output is one of the inputs that is selected by a control</p><p>-The selector (or control) value determines which of the inputs becomes an output</p>
27
New cards

What are the two forms of two-level representation?

knowt flashcard image
28
New cards

What is Sum of products (SOP)?

-A form of logical representation that employs a logical sum (OR) of products (terms joined using the AND operator)

<p>-A form of logical representation that employs a logical sum (OR) of products (terms joined using the AND operator)</p>
29
New cards

What is a progammable logic array (PLA)?

-A kind of programmable logic device used to implement combinational logic circuits

-Implement logic functions as a sum of products

-two stages of logic:

1. generating product terms of the inputs and input complements

2. generating

sum terms of the product

terms

<p>-A kind of programmable logic device used to implement combinational logic circuits</p><p>-Implement logic functions as a sum of products</p><p>-two stages of logic:</p><p>1. generating product terms of the inputs and input complements</p><p>2. generating</p><p>sum terms of the product</p><p>terms</p>
30
New cards

What are minterms (aka product terms)?

-The first stage in an array of AND gates form a set of product terms

-Each product term can consist of any of the inputs or their complements

31
New cards

Explain a logical shift right

-Fills the left end with k zeros

eg.

0110 0011 x>>4 (logical)

0000 0110

32
New cards

Explain an arithmetic shift right

-Fills the left end with k repetitions of the MSB

eg.

1001 0101 x>>4 (logical)

1111 1001