Binary System & Hexadecimal 1.1.1, 1.1.2

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

How do you convert a positive denary integer into hexadecimal?

*IF the number is bigger than 256 you need 3 digits of hex otherwise you need 2* -Divide denary by 16, the remainder is your hex value -Repeat until the denary number is lower than 16 (to assign hex value) -The order is from bottom to top, so the very first remainder is the last hex value eg. 345 345/16= 21 r 9 (9) 21/16= 1 r 5 (5) 1/16= 0 r 1 (1) 159 eg. 234 234/16=14 r 10 (A) 14=E 234= EA (hex value) (https://www.youtube.com/watch?v=2bezAhO6EEQ)

How do you convert a positive hexadecimal integer into binary

-Convert EACH hexadecimal into 4 block binary digits -can do it via denary eg. A92 A= 10 9= 9 2= 2 8 4 2 1 (10) 1 0 1 0 8 4 2 1 (9) 1 0 0 1 8 4 2 1 (2) 0 0 1 0 binary = 101010010010 (https://www.youtube.com/watch?v=D_YC6DSPpQE)

Describe 2 advantages of using hexadecimal to represent numbers compared to denary

-It is easy to convert hex digits back to binary if necessary - greater number of possible combinations in the same number of digits, so when written, can hold bigger numbers in fewer digits e.g. Can represent 16 bit words as only 4 hexadecimal digits

How is hexadecimal used to display the contents of a memory dump when debugging

-Register contents are displayed as bytes in hex when using memory dumps. - This lets the programmer see what values were held and is much easier to read than 1s and 0s

How do you convert a positive binary integer into hexadecimal?

-Split binary number into groups with 4 binary digits in each one. Do this from right to left, don't mix up numbers -If there is not a multiple of 4, add zeros (0) to fill up gaps -in each group use the headings 8, 4, 2, 1 - Work out the denary digit for each group -Convert the denary digit into hex (so if its 10> use letters) eg. 1 0 0 1 1 0 1 1 1 1 group 1= 1 1 1 1 group 2= 0 1 1 0 group 3= 00 1 0 8 2 4 1 1 1 1 1 = 8+2+4+1= 15 8 2 4 1 0 1 1 0= 2+4= 6 8 4 2 1 0 0 1 0= 4 hex value= 26F (https://www.youtube.com/watch?v=tSLKOKGQq0Y)

Describe three advantages of using hexadecimal to represent numbers compared to binary

-uses less screen space. - Easier for humans interpret - easier to spot errors

How do you represent dark colours HEX?

-with more or less of each component - different combinations in hex codes will create different shades/tones/colours Dark blue= 00008B Dark Red= 8B0000 Dark green is 008B

How do you convert a positive hexadecimal integer into denary?

256, 16, 1 (no more than 3 digits as no calc) -write the hexadecimal number under the headings -multiply each hexadecimal value by the heading of column it is in eg. 2AC 256, 16, 1 2*256 + 10*16 + 1*12= 684

What is a bit?

A bit stands for binary digit, a single number in any of the columns in binary. (1 or 0)

Denary values of A through F

A=10, B=11, C=12, D=13, E=14, F=15

How are hexadecimal numbers used in assembly languages?

Assembly languages uses hexadecimal numbers for values. The instructions are in letter codes (mnemonics) which will be converted to hexadecimal values by the assembler

What is hexadecimal?

Base 16. Hex uses characters A through F and digits 1 through 9.

What is binary?

Base 2. Binary uses characters (numbers) 0 and 1 only.

How is a binary number stored in a register?

Each bit of the register represents one digit in the binary number if there is a 5 bit register, the number will be a 5 bit binary number with the place values 16 8 4 2 1.

What information is stored in a MAC address (first 3 bytes then second three bytes)?

First three bytes/six digits: manufacturer code/manufacturer ID Last three bytes/six digits: serial number/serial ID of device/product

How is a hexadecimal number used to represent colours in HTML?

In HTML, colours are represented using an RGB (red, green, blue) number. -Each colour can have a denary value from 0. If 0= off, 255= fully on -This is written from 00 to FF in hex RRGGBB ( 2 digits of hex for each)

ow are hexadecimal numbers used in machine code?

In machine code, both instructions and data can be written in hexadecimal instead of binary, as this makes it faster for a person to enter, edit and error check, but can still be processed directly by the processor

How does MAC address use hexdecimal numbers?

It is 6 pairs of hexadecimal digits e.g. 1A-16-C5-22-FF-FF that is the unique identifier given to that device when it is manufactured and cannot be altered

What are the multiples of a byte (2^x) that are used in measuring storage and memory size?

Kilobyte= 2^10 bytes (1024) Megabyte= 2^20 bytes (1024^2) Gigabyte= 2^30 bytes (1024^3) Terabyte= 2^40 bytes (1024^4) Petabyte= 2^50 bytes (1024^5) *8 megabits (Mb)= 1 Megabyte (MB)

How could you represent an binary number using colours?

One colour is 0, another is 1 value. -works with tones, lights

How do you represent the following colours in HEX? -Red -green -blue -yellow (red and green) -magenta(red and blue) -cyan(green and blue)

Red= FF 00 00 Green= 00 FF 00 Blue= 00 00 FF Yellow= FF FF 00 Magenta= FF 00 FF Cyan= 00 FF FF

Uses of binary

Robots, computers digital systems

What is a byte?

Smallest unit fo memory in a computer. -8 bits= byte -used to represent characters in ASCII

How do you convert a positive binary integer into denary?

Use headings and match up binary number 128, 64, 32, 16, 8 4 2, 1 eg. 1 1 1 0 1 1 1 0 128, 64, 32, 16, 8 4 2, 1 1 1 1 0 1 1 1 0 128+64+32+8+4+2=238

How do you convert a positive denary integer into binary?

Use headings, 128, 64, 32, 16, 8 4 2, 1 (how many binary headings make up the denary number) -work from highest to lowest (128-1) -If denary number 'fits' in heading, subtract the denary number with the heading number add a 1 under the heading -If not, add a zero and move down to the next highest number eg. 94 128, 64, 32, 16, 8 4 2, 1 0 1 0 1 1 1 1 0 94-64= 30 30-16= 14 14-8=6 6-4=2 2=2 94= 0 1 0 1 1 1 1 0 (watch video if you dont understand: https://www.youtube.com/watch?v=rsxT4FfRBaM)


Kaugnay na mga set ng pag-aaral

accounting 201 chapter nine smartbook

View Set

English-Literature, Reading Processes, and Skills, Questions

View Set

ES 342 Practice Test & Practice Questions Review

View Set

Latijn SPQR les 17 woorden (dikgedrukt)

View Set