2011S001/Midterm

4 stars based on 57 reviews

To understand binary numbers, begin by recalling elementary school math. When we first learned about numbers, we were taught that, in the decimal system, things are organized into columns: H T O 1 9 3 such that "H" is the hundreds column, "T" is the tens column, and "O" is the ones column. So the number "" is 1-hundreds plus 9-tens plus 3-ones. As you know, the decimal system uses the digits to represent numbers.

The result of binary addition 1+1+1=______ binary system works under the exact same principles the result of binary addition 1+1+1=______ the decimal system, only it operates in base 2 rather than base In other words, instead of columns being.

Therefore, it would shift you one column to the left. For example, "3" in binary cannot be put into one column. What would the binary number be in decimal notation? Click here to see the answer Try converting these numbers from binary to decimal: Since 11 is greater than 10, a one is put into the 10's column carriedand a 1 is recorded in the one's column of the sum.

Thus, the answer is Binary addition works on the same principle, but the numerals are different. Begin with one-bit binary addition:. In binary, any digit higher than 1 puts us a column to the left as would 10 in decimal notation.

Record the 0 in the ones column, and carry the 1 to the twos column to get an answer of " The process is the same for multiple-bit binary numbers: Record the 0, carry the 1. Add 1 from carry: Multiplication in the binary system works the same way as in the decimal system: Follow the same rules as in decimal division. For the sake of simplicity, throw away the remainder. Converting from decimal to binary notation is slightly more difficult conceptually, but can easily be done once you know how through the use of algorithms.

Begin by thinking of a few examples. The result of binary addition 1+1+1=______ as intuitive is the number 5: Then we just put this into columns. This process continues until we have a remainder of 0.

Let's take a look at how it works. To convert the decimal number 75 to binary, we would find the largest power of 2 less than 75, which is Subtract 8 from 11 to get 3. Thus, our number is The result of binary addition 1+1+1=______ this algorithm a bit more formal gives us: Find the largest power of two in D.

Let this equal P. Put a 1 in binary column P. Subtract P from D. Put zeros in all columns which don't have ones. This algorithm is a bit awkward. Particularly step 3, "filling the result of binary addition 1+1+1=______ the zeros. Now that we have an algorithm, we can use it to convert numbers from decimal to binary relatively painlessly.

Our first step is to find P. Subtracting leaves us with Subtracting 1 from P gives us 4. Next, subtract 16 from 23, to get 7. Subtract 1 from P gives us 3.

Subtract 1 from P to get 1. Subtract 1 from P to get 0. Subtract 1 from P to get P is now less than zero, so we stop. Another algorithm for converting decimal to binary However, this is not the only approach possible. We can start at the right, rather than the left. This gives us the rightmost the result of binary addition 1+1+1=______ as a starting point.

Now we need to do the remaining digits. One idea is to "shift" them. It is also easy to see that multiplying and dividing by 2 shifts everything by one column: Similarly, multiplying by 2 shifts in the other direction: Take the number Dividing by 2 gives Since we divided the number by two, we "took out" one power of two.

Also note that a1 is essentially "remultiplied" by two just by putting it in front of a[0], so it is automatically fit into the correct column. Now we can subtract 1 from 81 to see what remainder we still must place Dividing 80 by 2 gives The result of binary addition 1+1+1=______ can divide by two again to get This is even, so we put a 0 in the 8's column.

Since we already knew how to convert from binary to decimal, we can easily verify our result. These techniques work well for non-negative integers, but how do we indicate the result of binary addition 1+1+1=______ numbers in the binary system? Before we investigate negative numbers, we note that the computer uses a fixed number of "bits" or binary digits.

An 8-bit number is 8 digits long. For this section, we will work with 8 bits. The simplest way to indicate negation is signed magnitude. To indicatewe would simply put a "1" rather than a "0" as the first bit: In one's complement, positive numbers are represented as usual in regular binary. However, negative numbers are represented differently. To negate a number, replace all zeros with ones, and ones with zeros - flip the bits. Thus, 12 would beand would be As in signed magnitude, the leftmost bit indicates the sign 1 is negative, 0 is positive.

To compute the value of a negative number, flip the bits and translate as before. Begin with the number in one's complement. Add 1 if the number is negative. Twelve would be represented asand as To verify this, let's subtract 1 fromto get If we flip the bits, we getor 12 in decimal.

In this notation, "m" indicates the total number of bits. Then convert back to decimal numbers.

Manuale trading forex gratis

  • Opciones de aprendizaje trading toronto

    365binaryoption review 365binaryoptioncom broker

  • 25 binary option tester is updated

    Forex smart investor

Eurusd forex binary options limitations in identifing entry signals when using fibonacci levels bina

  • Binary options usa clients brokers japan

    Punice trading options

  • Daytrader werden

    Gunstigster online trader

  • X trade brokers romania news

    Binarytraderru

Binary options analysis majority of asian equities slide on cyprus woes

28 comments Binary options vs spot fx contract

Free forex training london

The following are sample midterms. I still need to enter in problems in a few places. All sample midterms should be complete by Saturday, March 5th. I will also add a few more solutions but not solutions for every problem. To prepare for the exam, I suggest the following approach: On questions where you have difficulty, re-read the relevant section in the notes and then try to re-do the homework questions.

The Midterm exam is closed note and closed book. Calculators are not allowed they will not be needed. All others will be given. Answer is 15 in decimal. This is similar to what happens when you add a zero at the end of a decimal number - you get the same result as multiplying the number by 10 1.

Why is the binary number system base 2 important in computing? Why don't we use, for example, base 3 or base 5? Give a sentence answer.

In addition, computers are built using logic gates. Logic gates are built using transistors. To represent these to states, we only need a number system with two values. Note that the statement "not all numbers can be represented with base 3 or 5" is not correct. Write down the algorithm that you use to do the multiplication of two decimal numbers, for example,. Perform the following multiplication, assuming that the numbers are binary, in two ways show your work and write your answer in binary:.

You should get the same answer for both cases: For the algorithm question, I am looking for answers that include such statements as "multiply the two numbers in the first column. If the result is larger than 99, then split the result in two pieces an place the left-hand side on the top of the second column. The first and last questions involve setting up a logic table for every possible combination of inputs A and B and then writing down the corresponding output.

The question does not ask what the logic table is for a NAND and AND gate - the question is about the logic table corresponding to the given configuration of logic gates. Note that the answer logic table for the third answer is the same as that of an AND gate. In class we did an experiment in which we estimated the number of bytes a person could memorize in 60 seconds. Our estimate was 1. Describe the experiment and the calculation used to arrive at the estimate of 1.

The experiment involved memorizing a string of digits in 60 seconds. The average number memorized was 10 digits. An alternative and equally valid solution is to say assume that each digit is encoded using four bits which allows 16 patterns, enough to represent the symbols for 0, 1, Suppose that you have an instrument that can store eight bits in memory. Your instrument is set up to measure values from 0. You assign the binary number to the measured value of 0. Describe three types of limitations on computations that can be performed with a computer.

For each case, give an example of a type of computation where this limitation would be evident. The following set of logic gates can be used to add two binary numbers. If switch A is "on" in the down position and the switches labeled B and Carry in are "off" in the up position , which lights will be lit? The "sum part" bulb will be lit. Note that you did not need to know the logic table for an XOR gate or what state the switches are in on the image. You were told that the bulbs correspond to binary addition and that.

So the result of this is the same as if you typed. The second line creates a matrix that is 10 rows by 10 columns. The third line attempts to access the 11th column which does not exist. The part that can be converted into a for loop start on the second line. The folllowing are all valid answers:.

On the left a black triangle is shown with a grid overlayed. In the middle panel, draw a black-and-white digitized version of the triangle in Panel 1 using tiles that are the same size as the grid squares. State the algorithm that you used to determine if a tile was to be black or white. In the right-most panel, and using the same algorithm, draw a black-and-white digitized version of the triangle in Panel 1 using tiles that are one-half the width and height of the grid squares.

Write down a possible representation of what you drew in the middle panel as a series of ones and zeros. My new monitor supports bit color. My new monitor can represent twice as many colors than my old monitor. In a few sentences or bullet points, explain why is this is incorrect and re-write the last sentence so that it is correct. With 8 bits, 2 8 unique combinations of 8 zeros and ones can be written down. If we associate a color with each each set of 8 zeros and ones, then 2 8 colors can be represented.

For 16 bit color, the number of unique combinations is 2 The correct sentence is "My new monitor supports times the number of colors". The claim of twice as many is a mistake because number of unique combinations of zeros and ones and hence number of unique colors is not proportional to the number of bits. If you were to write an advertisement, would you say your brand has " times more colors" or "twice as many bits" than the competitor's brand?

You are told that the disk drive contains square images that are made up of square black or white tiles. You are also told that 1 means black. Suppose that you have an eight-bit calculator and you wanted to add a number to The calculator was set up to represent integers from zero and higher. What is the largest number that you could add to and still expect a result? If you choose to associate each of the unique combinations of 0s and 1s with a decimal number, you could write 0, 1, 2, For reference, the logic table associated with a NAND gate is shown.

The interpretation of the image is that each of the three input numbers are represented as a zero or one, depending on the state of the switch. The interpretation of the light bulbs is that "lit" represents a one and "dark" represents a zero.

If both lights are lit then it means the sum in binary is 1 1. Write down commands that you could enter in MATLAB to create a matrix that has two rows and three columns and has the value 3. Which computer would be better for a person who will only use the computer for storing his collection of digital photos and videos?

Suppose that you have an instrument that can store only four bits in memory. What is the largest instrument measurement value of X that is possible to store in this memory? If both switches A and B are "on" down , which lights will be lit?

Retrieved from " http: Views Article Discussion View source History. A 6x6 grid Grid with a black tile where a one occurs. Note that a valid solution is this image rotated 90 degrees - there is not enough information given to determine unique answer! A 3x3 grid blue squares placed on top of the 6x6 grid. Algorithm for coloring a tile black or white: If any black enclosed by bigger tile, color big tile black. To save this image on the disk drive you would write Alternative solution Algorithm for coloring a tile black or white: Adding 55 to gives , which is the largest number that you can represent with only 8 bits.

Input A Input B Output 0. The correct answer is E. None of the above! If your instrument was upgraded to store five bits in memory, what is X?