September 12, 2014

The Road Ahead

I haven't been posting much lately, simply because I haven't been programming much in my own time the past couple of weeks. I packed away my microcontrollers because I move in to Drexel next week!

Besides work keeping me busy, I have also been trying various distributions of Linux from live CDs/DVDs. I went a little overboard, I can choose a different operating system every day... for two weeks in a row! Yet it is a good to see the various distributions and evaluate which ones are best for me.

Probably my favorite so far is Xubuntu. More light than Ubuntu, and the particular version of Xfce makes for a nice clean desktop interface.

As for programming, I have no idea what I will be doing next. I need to focus on transitioning to college first, then I'll choose something to work on.

Some possibilities:

  • Try out the Adafruit Neopixels I bought
  • Try out new I2C sensors such as an IMU (position sensor that measures acceleration, rotation, and orientation with respect to the Earth's magnetic field
  • Try again at making a serial library
  • Try using bluetooth to control a single-board computer (BeagleBone Black or Raspberry Pi) from an Android phone
  • Or maybe something else entirely!

September 10, 2014

Sig Figs Explained

Today I noticed one of my friends were having trouble with significant figures in chemistry. Here is a post to help people figure out some of the more ambiguous cases.

Case 1: Inexact quantity

Suppose we have some sort of salty food. On the label it says:
"Sodium: 300 mg"

Sig Figs: 1

Why: Due to rounding in the label and the fact that each serving might not have exactly the same proportions, you could easily have 290 mg, 320 mg, 310 mg, or anything that's between 250 and 340 mg. Otherwise, the number would be 200 or 400 mg. Since we can't figure out what the tens or ones place is, the only digit we know is exact is the 100s place, hence 1 sig fig.


Case 2: Exact quantity

Suppose we are counting ducks in a pond. We count them a few times to make sure we have an exact count:
"1, 2, 3, 4, ... 298, 299, 300"
"1, 2, 3, 4, ... 298, 299, 300"
"1, 2, 3, 4, ... 298, 299, 300"

Sig Figs: Infinite

Why: This is an exact count. You are absolutely sure that you do not have 299 or 301 or 302 or 300.5 ducks, so there is no uncertainty. It is not 3 sig figs, for we know that the tenths place is 0. it's not 4 sig figs for we know that the hundredths place is also 0. In fact, we know that there are 300.00000000000000... ducks on the pond.

Case 3: Defined Quantity

The conversion factor from inches to centimeters is defined as:
2.54 cm = 1 in.

Sig Figs: Infinite

Why: The conversion factor is a definition; there is no uncertainty. Even though the number goes to 2 decimal places, there is no possibility of 2.55 cm equaling 1 inch due to the way that the quantities are defined.

Case 4: Textbook Ambiguity

Suppose a textbook problem talks about a 300 L tank of water.

Sig Figs: Depends. 1 if interpreted as a measurement, infinite if interpreted as a definition.

Why: This really depends on the textbook.

Some textbooks might treat it as a measurement. Then it would be one sig fig for it might not be exactly 300L in real life.

Other textbooks might give an answer with more sig figs than should be needed. If so, it is either because they treat it as a theoretical example where numbers can be exact, or just provide extra sig figs so you can check your math before rounding.

All in all, check your textbook carefully. If the questions denote different numbers of sig figs differently, they probably treat numbers as measurements. If not, the textbook might treat it as a definition.

If you are not sure, talk to your teacher.

Avoiding Ambiguity

When writing numbers, there's a number of conventions to help determine how many sig figs for a measurement. Take these for example:

300 - 1 sig fig
300. - 3 sig figs. the decimal shows that we know up to the decimal place for certain
300 - 2 sig figs. an underline explicitly shows the last significant figure.
3x10^2 - 1 sig fig. In proper scientific notation, every number shown on the left of the x is significant.
3.0x10^2 - 2 sig figs. Same rule as the previous example.

I hope that helps to explain some of the more challenging aspects of sig figs, particularly zeros.