The binary number system is a base 2 number system that uses only the numerals 0 and 1 to represent “off” and “on”, respectively. So, in decimal, the number 1 is 0001 in binary, 2 is 0010 in binary, 3 is 0011 in binary, 4 is 0100 in binary, and so on. The decimal equivalent of any binary number can be found by summing up the power of 2s. For example:
16 + 8 + 0 + 0 = 24
The example above shows how to convert 00011000 from binary to decimal. In this case, 24 would be the target position for a digital user interface.
In order to minimize the amount of time required for a user to reach any given target on an interface (for example, going from position 1 to position 24), the best method is generally the grey code sequence.
The grey code sequence was first proposed by Frank Gray of Bell Telephone Laboratories in 1953 (hence its name). A correctly implemented grey code sequence will ensure that only one bit will change when moving from one position to another. This has obvious benefits when designing an interactive digital user interface: Users don’t need to traverse every single position between two targets. Instead they only need to traverse each position once
The Grey Code is a great way to maximize the accuracy of a digital user interface.
All buttons and switches have a tiny amount of error, which means that when you push a button, it might not actually register. If your iPhone had 0% error in the buttons, it would be worthless to touch at all because you would never be able to push them down hard enough to trigger them.
So there are three ways we can handle this error:
1. We can set thresholds on our buttons such that the button must be pressed for X milliseconds before we register it as a “click.” But then if someone comes along with slightly stronger fingers than the rest of us, we’ll all be stuck pushing buttons for longer than necessary.
2. We can track how people are using our product and set the thresholds for each button on an individual basis based on how long that particular user typically presses each button for. But then we add in more overhead and more complexity, and I’m not sure that it’s worth it.
3. We can use something like grey code which keeps track of whether or not each click is supposed to be registered as a click or not registered as a click. This has other benefits as well: we don’t need to worry
A gray code is a binary number sequence that has the property of having only one bit change between adjacent values. It’s used in digital encoders to ensure that there are no two values in the sequence so close together that they might be confused with each other.
The term “gray” is derived from a type of reflected light that has equal amounts of red, green and blue, also known as “neutral.” The term “code” comes from the concept of encoding information, usually in the form of a binary sequence. Gray codes are extremely useful for representing digital interfaces for various reasons.
Gray codes are often used in industrial applications where there might be mechanical wear or misalignment. Since the sequence only changes by one bit each time, it’s easier on the system if there’s some sort of error introduced. For example, if you’re using a rotary encoder to determine a value on a screen, and it skips over several values because of wear or misalignment, you still will have an accurate reading as long as it doesn’t skip too many values.
For example, if we were to use a normal binary sequence where each value is incremented by 1 starting at 0, we would get something like this: 0000, 0001, 00
The binary numbering system is the most commonly used system of digital representation. It is an easy and straightforward way to represent numbers, but it has a couple of drawbacks:
Arithmetic operations are much more tedious than they would be with another number system (e.g., the decimal system).
The representation of numbers often requires many digits, since each digit represents an exponent of two. For example, the decimal number 16 would be 1000 in binary, using four digits (1 * 2^3 + 0 * 2^2 + 0 * 2^1 + 0 * 2^0 = 1000).
The first drawback is not too problematic for computers, as arithmetic operations can be done relatively quickly by a CPU (although it can still have some advantages to use other ways of representing numbers). However, the second drawback is a bit more difficult to work around.
Imagine you are designing a digital clock. The time displayed on the clock should change every second, which means that every digit position needs to change at least once per second. If you were to use a 4-digit binary display for this clock, then the last digit (the ones position) would need to change ten times per second; this seems perfectly doable. But the second last digit (the twos
A binary digit (bit) is the most basic entity of information in computing. It can represent two values, usually 0 and 1, or false and true. A sequence of bits can therefore represent 2n different numbers where n is the length of the sequence. For example, 10011001 is a sequence of 8 bits and has 28 = 256 possible values, ranging from 10011001 to 01100110.
This is all very well if you are a computer scientist, but if you are a user interface designer you need to know what these numbers mean for your users. The idea behind “grey code” is to make it as easy as possible for your users to enter number sequences by hand.
The binary number system is an important concept in computer science. As you probably know, each digit in a binary number can only be one of two values, 0 or 1. For example, the number 1011 would be read as “one zero one one”.
Each digit in a binary number represents an exponent of two. Thus the right-most digit is the “two to the zero power” position, the next digit to the left is the “two to the first power” position, and so on. Let’s take a look at this in action:
2^3 2^2 2^1 2^0
1 0 1 1
Therefore, 1011 = 8 + 0 + 2 + 1 = 11 (in decimal)
One common use for binary numbers is for representing colors. There are three color components: red, green, and blue. Colors on your screen are made up of combinations of these three colors. You may have heard of this color scheme referred to as RGB. Each color component can range from 0 to 255 (in decimal). This means that there are 256 possible values for each color component. If we were writing out all possible combinations using decimal notation we would need 3 digits per combination. However, if
Please take a look at the following example to see what happens when your mouse leaves the element and enters the surrounding area:
This example uses our jQuery plugin jquery-mouse-leave-area. You can see that when you move your mouse over the textbox or dropdown, it turns blue to indicate that your mouse is inside the element, but when your mouse moves into the surrounding area, it turns back to red. This way, if you miss clicking inside the element and hit the surrounding area by accident, you will still know that your click did not register with that element.