Module 1 - Numbers

Ace your homework & exams now with Quizwiz!

Describe unicode

Made to to character limitations of ascii Created to enable people around the world to use computers in any language Continues to expand and currently has 150 languages Uses >1 byte per character Can be used to send emoji UTF-8 is a hybrid of ascii and unicode

The hexadecimal value #6BF is equal to: 1737 0010 1011 1111 1010 1011 1111 1727

1727

Decode the following Unicode message: U+0045 U+006E U+006A U+006F U+0079 U+0059 U+006F U+0075 U+0072 U+0044 U+0079 U+0021

EnjoyYourDy!

Match equal values

(from top down): 6, 2, 5, 3, 4, 1

Converting to binary (using table): a) 26 b) 75

1. Look at which of the top row can add together to make the number - usually pick the next biggest column value then go small 2. Subtract that number from original 3. Repeat #1 with new subtracted a) 26 = 16+8+2 Give these columns a 1, and any non-used columns get a 0 = 11010 b) 75=64+8+2+1 = 1001011 ~~~~ Each column (right to left) is a column of binary

How to go binary to hex? a) 111101100 Hex to binary? b) 3FB

1. Partition number into groups of four (starting right) 2. Convert each group of 4 binary digits to Hex a) 111101100 = 1 1110 1100 b) use table 1 = 1 1110 = E 1100 = C 1EC b) 3FB use table 3 = 11 F = 1111 B = 1011 = 1111111011

The number 210 is equal to: 1101 0010 1001 0010 1101 1111 1101 0110

1101 0010

The hexadecimal value #7CA1 is equal to: 0111 1100 1001 0001 0011 1101 1010 0001 1111 1100 1011 0010 0111 1100 1010 0001

1111 1100 1011 0010

The binary number 1011 0101 is: 362 180 181 216

181

What is 3FB (in hex (16))

3FB Bx16^0 = 11 x 1 = 11 Fx16^1 = 15x16 = 240 3x16^2 = 3 x 256 sum = 1019 ~~~~ hex goes 1-9,A-F

If a switch can be in the "up", "middle" or "down" position, how many messages can be conveyed with 6 switches?

3^6

Convert the phrase "Happy Learning CS100!" into hexadecimal ASCII codes.

48 61 70 70 79 20 4C 65 61 72 6E 67 20 43 53 31 30 30 21

Convert the phrase "Chocolate or Fries?" into decimal ASCII codes.

67 104 111 99 111 108 97 116 101 32 111 114 32 70 114 105 101 115 63

In binary, if there are 13 switches, how many values can be expressed?

8192

Identify the false statement about ASCII. ASCII computes 126 different characters. ASCII was the first official numbering system. The code ranges from 0-127. Each character in ASCII is less than a byte.

ASCII computes 126 different characters.

What is 11010 in base 2?

Always a 0 column 11010 2^0 = 0 2^1 = 2 2^2 = 0 2^3 = 8 2^4 = 16 sum = 26 ~~~ Can ignore 0 just keep column # incrementally increasing

Describe ascii Character

American Standard Code for Information Interchange a character is anything you can type on a keyboard ASCII assigns each character a number Starts at 32, goes up to 126 - 0 - 127 rrly 7bits per character ~~~~ By hex ascii determines alphabetical order Helps standardize communication system

What is the primary motivation behind using hexadecimal? a) It is easy to convert between hexadecimal and decimal. b) It is easy to convert between hexadecimal and binary. c) Hexadecimal is the most commonly used numbering system worldwide. d) Hexadecimal uses letters to be more easily understood.

B

How to count in different bases? Base10 (decimal) Binary?

Base10 Decimal Always start from 0 - go up in integers (0-9) >> because have 10 digits on fingers (zero is a digit) Right-most column is 0 Try to add one to current column - if >9 reset column to 0 and move onto next column Always hidden digits (if not seen assume 0) - 1 is actually 001 ~~~~~~ Binary uses Base2 0 1 10 11 100 101 110 111 1000

Why use hex? Notation?

Because each byte is exactly eight binary digits, that means each byte is always exactly two hex digits. That makes it really easy to identify how many bytes of information a number is, and what those bytes are. Can do 0x_____ or #____

describe bits and bytes

Bit (b)= binary digit - each 1 or 0 Byte (B)= 8 bits - like a carton of eggs - can have empty bits inside - has 2^8 = 258 values 1 kilobyte = 1,024 bytes >> 2^10 bytes 1 megabyte = 1,024 kbs >> 2^20 bytes

What character(s) can you put in front of hexadecimal numbers to identify them as hexadecimal? a) # b) 0x c) Both A and B d) All of the above

Both A and B

What is a signal

Change over time Time can be discretize time - set as a sampling frequency (i.e. how often you sample) >> Measured in Hz There will always be gaps in between sampling points, but that's okay - Aim for high precision so data "appears" smooth

Describe digital colour Colour theory - subtractive -additive rgb(100,50,200) hex colour

Colour is continuous so need to discretize them - give them number Colour Theory - Subtractive = combined paints absorb (are darker) (subtract) more light - Additive = combine lights become lighter >> RedGreenBlue >>> 3x8 bits per byte = 24-bit colour 0 = black, 255 is the bright colour rgb(100,50,200): medium red, little green, lots of blue = purple ~~~ if rgb is same quantity then is a shade of grey ~~~~ Hex colour #RRGGBB The most sig digits are first of pair (R_G_B_)

On the ASCII table, the first 31 characters are what kind of characters? Control Characters Style Characters Static Characters Unique Characters

Control characters

How to convert to decimal? Do 1234

For 1234 >> 4 is the 1 unit >> 3 is the 10 unit >> 2 is the 100 unit << 1 is the 1000 unit so each unit is 10^column# >> 10 since base 10, changes for each type of base ~~~ 11 in base10 is "eleven" 11 in base2 is "three" 11 in base16 is "seventeen"

What does digital mean? Analog?

Digit = fingers = countable All data is digital = countable - anything storable = digital Analog is continuous - clocks, thermometers ~~~ Think of analog thermometer in the glass Digital thermometer just shows numbers

Describe binary

Digitized data represented in 1's and 0's Chosen due to ability to distinguish between two different values There are 2^k values - where k is number of options that can be on/off >> off = 0; on = 1

Describe discrete vs continuous quantities

Discrete: Integers Continuous: Real numbers - often we round off (discretize) things like length and time to make them discrete Discretization became digitization

You want to make a banner for your friend's birthday party. She has told you the Hex codes for the colour scheme of her party. They are #e6b800, #4d0000, and #000000. What colours will you make the banner in? Gold, maroon, white Black, blue, yellow Gold, maroon, black Green, black, white

Gold, maroon, black

Describe integers and real numbers

Integers are whole natural numbers (1,2,3,22,-1,-2) Real numbers are numbers with fractional parts (1/3, 3.1) Real numbers include integers

Describe exponents

Negative exponents are just inverse

Identify the false statement about the application of the additive colour theory. Each colour in RGB consists of 8 bites or 1 byte. RGB translates to 24-bit colour. RGB(70, 200, 130) is purple. #00FFFF is cyan.

RGB(70, 200, 130) is purple.

What is the term used in the modules to specify a value changing over time? a. Intervals b. Slope c. Nibble d. Signal

Signal

The logo on many power buttons is a combination of a 1 and a 0. True False

True

True or false: a byte contains two nibbles, or eight bits

True

Computers that exchange information between countries and regions will most likely use: Unicode Extended ASCII Extended Binary Coded Decimal Interchange Code (EBCDIC) Binary

Unicode

What is UTF-8 a combination of? Unicode and decimal Decimal and binary Hexadecimal and binary Unicode and ASCII

Unicode and ASCII

Which of the following statements is/are true? a) There are 8 bits in a byte. b) A byte is either a 1 or a 0. c) There are 8 bytes in a bit. d) A bit is eight 1s or 0s. e) A byte can have 256 different possible values

a and e

What scale would be discrete? a. balance (like the two plates balancing) b. digital scale c. weighting scale (analog) d. measuring tape

digital

The number 100 is which of the following? i. integer ii. real number iii. imaginary number iv. rational number

i, ii, iv


Related study sets

TestOut Server Pro 2016 - 15.3.8 - Lab - Create a Failover Cluster

View Set

C169 - WGU Scripting and Programming - Applications

View Set

Chapter 7: Followership (Leadership)

View Set

MED SURG (in class questions) GI and GU

View Set

Abnormal psych final exam (chapter 16)

View Set