BINARY SYSTEMS Flashcards

1
Q

What are the 2 ways of data representation nd which is used in the modern day world?

A

Analog signals - continuous and vary in strength and quality
Digital signals are in one of the 2 states ON or OFF. Modern-day computers are digital

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Decimal, a base 10, is ______ number system

A

Positional

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

_____ is the magic number in computing

A

2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the 2 methods of binary to decimal conversion?

A

Repeated division by 2 and powers of 2 factorization

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In binary addition, a carry over is when __+___ occurs

A

1+1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Bit contains ___ piece of info and can hold one of the 2 values that is ___ or ___

A

One
on or off

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

a byte is made up of ___ bits

A

8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

a byte can hold ___ number of values and the range is ____

A

256 (0-255)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

ASCII represents each character as a unique ___ bit code

A

8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a unicode

A

16-bit character encoding scheme that allows characters from all major world languages, living and dead, to be encoded in a single character

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is bitwise negation in ones complement?

A

In order to represent a negative binary number we have to flip the 0 to 1 and 1 to 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

1s complement of a positive number gives ____

A

Negative number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

1s complement of a negative number gives ____

A

positive number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which number is used a sign in 1s complement method system

A

The most significant bit which is the extreme left number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

if we are converting a negative binary number to decimal what is the first step

A

negate each bit to get a positive binary number then convert to decimal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the con of 1s complement?

A

Have to add the carry over to the resulting number (LSB) making it more complex

17
Q

How to get 2s complement of a number?

A

Negatig each bit and add 1 to the least significant bit

18
Q

What is the range in 2s complement?

A

The range of 2’s complement form with N bit is:
〖−(2〗^(𝑁−1)) 𝑡𝑜〖 (2〗^(𝑁−1)−1)

19
Q

What are the pros and cons of the Signed Magnitude method?

A

Pro : easy for humans
Cons: Hard for arithmetic circuits to handle sign, so more complex. Arithmetic circuits must handle both “zero” cases so more complex

20
Q

What is the purpose of the loop structure in Python?

A

Makes coding easier as u do not have to copy again and again

21
Q

What is an iterable entity?

A

An iterable is something you can loop through, like a list or a string. When you loop through it, Python goes through the items one by one for you.

22
Q

the _____ function indicates the number of iteration of the floor loop

A

range()

23
Q

_____ statements inside the for loops are executed once for each value in the range

A

Indented

24
Q

When is the range function used in the python?

A
  1. When a user wants to perform a specific action for a certain number of times
  2. To generate a specific sequence of numbers
25
Q

What are the 3 main arguments of the range function?

A

Start - the integer indicating the starting point
stop: integer BEFORE which sequence is to be returned and indicates end to the sequence
step: integer indicating increment or decrement between 2 consecutive intgers

26
Q

if only one arguement is passed to the range it is considered a ____ argument

A

STOP

27
Q

The ___ parameter in print fxn is used to add a string at the end of the print output

A

end

28
Q

explain the python “for” loop briefly

A

The Python “for” loop operates on iterable items, which could be strings, lists, etc.
1. When the program is executed and it enters the for loop it checks for an iterable item and if there is one the block of code is executed inside the loop processing the statements inside the block
2. Then it checks for the next iterable item, if true, the loop moves to the next item and repeats the process.
3. If false, the loop ends and the program moves outside the loop to process the next items

29
Q

_____ os the process of repeating steps or instructions multiple times. It is also the repeated execution of a block of code for each item in a collection or until a specific condition is not met

A

iteration

30
Q

Which function indicates the number of iteration of the for loop ?

A

Range()

31
Q

What is the purpose of end= fxn in pyhton?

A

It is to add any string at the end of the output of the print statement in Python

32
Q

____ keyword is used to end the loop or breakout from it

A

BREAK

33
Q

What helps determine if a number has factors or no?

A

FLAG

34
Q
A