Saturday, May 7, 2011


nnedi okorafor. credit: Wikimedia commons.

I live at Satellite town in Lagos and although I cannot speak for other literature enthusiasts, I know it is difficult finding novels or works of literature written by Nigerians living abroad. So, the day I discovered Nnedi Okorafor’s short story on the website, I quickly downloaded the page.

The short story is titled: The Go-slow. The author used a common situation in the country, traffic jams or go-slows, to paint a picture in her story of what she thought the truth was. I have to agree with her that “go-slows were like getting stuck in time warps.” I must say she has summed up the Nigerian situation very well; we are living a life that is haunted by the past, defeated by the past and indebted to the past that the present has become so frustrating, choked up by so much dirt and pollution, we have lost every desire to be innovative and progressive.

Nkem, one of the central characters in the story, manages to survive a go-slow that was capable of initiating a heart attack. Air pollution, noise pollution, frustration and abysmal deliberations are the elements Nkem has to undergo. Deluded in his belief that he has escaped, he encounters some birds, emus, who turn out to be humans imprisoned in animal bodies. Unaware that the bird he hits, tucked in the trunk of his car, is the leader of the emus, he is eventually arrested by her, a bird woman, Ogaadi, who is stronger than he is. She is a witch, an amusu, running away from her Uncle who had her imprisoned inside the soul of a bird. Ogaadi, though, is not the only prisoner in the story. Nkem is also a prisoner, haunted by the spirits of his birth because he is an Ogbanje child and the spirits want him dead so he can return to their world. Eventually, both persons agree to help themselves. Ogaadi eventually turns Nkem into an Eagle, a predator, a fitting animal that can help him fight the animals the spirit beings are using to disturb his life: hens, goats, horses and cows.

The writer, Nnedi Okorafor, believes that the situation of the characters, which I think mirrors the Nigerian situation, is due to the fact that the past has overtaken their present and future. They must have to defeat the past to live a normal life.

Nkem was born an Ogbanje. He has a rebellious streak that “made him marry [his wife] that much faster.” A popular actor, Nigeria’s “sexiest man alive”, who believes that he has defeated the burden of the go-slow, the general go-slow, Nkem is haunted by his friends in the spirit world who have used a hen, a goat and a horse to try to kill him in the past. As he sits through a depressing go-slow, they attempt, once again, to use an insane cow to kill him but he escapes with scratches on the mirror of his car.

Ogaadi on the other hand, was initiated into witch-hood by her Uncle who is an Ogbanje. I think the Uncle is afraid of her, suspicious that she must have used her powers against her mother and sister, so he imprisoned her in the body of a bird, an emu. Ogaadi has braided hair (I wonder if Nnedi is writing autobiographically here?), is strong willed and the leader of the emus. But Ogaadi is haunted by her powerful Uncle who she believes “… can stop everything! I know his ways!” She is paranoid about her Uncle’s abilities that she has to wrestle Nkem, screaming, ““He sent you!” she screamed. “You think I’m stupid?”

Nkem is the typical westernized Nigerian. He uses foul language a lot, although I object to the writer’s use, often, of the vulgar and obscene word: fuck. He rides an air-conditioned car, placing him in the middle-class, and is on his way for a sexual fling with Agnes, a woman who lives in Owerri, while his wife is waiting for him at Aba. Nkem desires a release from the troubles he is having with supernatural forces that he envies the seeming freedom of a bird flying in the sky. Older than Nkem, Ogaadi is a teacher, an amusu, who will later give Nkem the opportunity to have a taste of that freedom.

Like Nkem and Ogaadi, Nigerians are troubled by events of the past. Nothing seems to work because they are helmed in by traditions and “ways of doing things”, these are spirits that have successfully haunted and defeated the Nigerian persona that we are expect to always follow tradition. This must be what prompted the writer to intentionally use language that would seem distasteful to a moral traditionalist. Unless we become predators who can go back to fight these spirits and defeat them, we will never move forward. The past will forever keep us in retrogressive evolution.

Sometimes the writer uses pidgin in a way that is somewhat annoying. I wonder why she should write “Awo” instead of the exclamation, “Ewo!,” or “Na wow,” when she means “Na waoh!” Maybe Nnedi Okorafor is not pidginized enough. On the other hand though, she writes beautiful prose, prose that is worthy of emulation and her voice is natural and apt.

I’d recommend that you read the short story yourself. the go-slow is a story that struck a cord.

I did, on Tuesday, tweet about her new novel on amazon, akata witch. Pick one of her books and read.

follow me on twitter, @emeka_david or be a friend on facebook, nnaemeka david

Tuesday, May 3, 2011

Conversion exercise in decimal and binary systems, part 2: fractions

In part 1 of these exercises, we treated whole numbers or integers. This second series will deal with fractions.

Fractions are divisions of numbers, as distinct from whole numbers. 2/3 is a fraction as well as 0.342. Most times, fractions are written as the latter, with a decimal place because it is more intuitive.

converting binary fractions to decimals:

Let us take a binary fraction like 0.1001 base 2 as recurring example. Note that the decimal point makes that number a fraction. The place values of binary fractions are determined starting from the decimal point and we count starting from negative 1 (-1). That is, the first digit after the decimal point has a place value of 2 raised to minus 1 or 2-1. The second digit has a place value of 2-2, the third a place value of 2-3 and so on and so forth accordingly.

Therefore, to convert 0.10012 using the expanded notation to base 10:

0.1001 = 1 x 2 + 0 x 2 + 0 x 2 + 1 x 2 
= 1/2 + 0 +0 + 1/16

Then make all the denominators the same

= 8/16+ 1/16
            = 9/16
            = 0.562510  

Alternatively, you could convert the fractions to decimals and then sum up the decimals although that route might take a long1er time.

Another way is this:

  1. Place the decimal point to a position at the end of the last digit. It is now an integer
  2. Count the number of places you moved the decimal point and denote it as n.
  3. Convert the integer to decimal or base 10.
  4. Divide the result in (3) to 2n.
  5. Produce the decimal from the fraction.

Place the decimal point at the end: 0.1001 becomes 1001.0

Count the number of places you moved the decimal point, n: 4.

Convert the integer to decimal: 1001 base 2 is 9 base 10.

Divide the result by 2n i.e 24: 9/16

Produce the decimal equivalent of the fraction: 0.5625 base 10.

converting decimal fractions to binary

Decimals fractions can take two types, the fractions whose denominators are prime factors of 2 and those which the denominator is not. Denominators of the earlier type have terminating binary fractional equivalents while the latter have binary fractions which do not terminate and this is important when doing the conversions.

Time to stretch your legs? Credit: Wikimedia commons.

Let's take the 0.562510 decimal as an example before we try some other exercise with a fraction without a decimal point.

The technique is:

  1. Multiply the decimal fraction by 2.
  2. If the result is less than 1, place a 0 after the next decimal point else the result is greater than 1, place a 1 after the next decimal point and remove the integer part of result. If the result is equal to 1, place a 1 after the next decimal point; you have reached the termination point for the binary fraction.
  3. If (2) has not terminated, go back to (1).

Decimal to binary fraction. Terminating.
Fraction Result
0.5625 0.
0.5625 x 2 = 1.125 > 1 0.1

The result of multiplying the fraction by 2 is greater than 1, so I added a 1 to the next decimal place after the decimal point. The binary fraction, (or the result) is not going to terminate. So, let's continue. But first, I will take away the integer from the fraction.

0.125 x 2 = 0.25 < 1 0.10
0.25 x 2 = 0.5 < 1 0.100
0.5 x 2 = **1.0 = 1** 0.1001

By repeating the steps above, we arrived at a doubled fraction which is equal to 1. The binary fraction has terminated to arrive at 0.10012 as the result. It's simple, right?

Binary fractions that do not terminate are fractions whose denominators are not prime factors of 2. A denominator is the number under the dividing line in a fraction. Let us say in 2/3 the numerator is 2 and the denominator is 3. Converting this decimal fraction to binary will not terminate, though you might end the manipulation when you get a repeating pattern. Let us take 2/3 as an example.

A decimal fraction producing non-terminating binary fraction.
Fraction Result
2/3 0.
2/3 x 2 = 4/3 = 11/3 > 1 0.1

The initial multiplication by 2 results in a number greater than 1. We place a 1 after the next decimal point, remove the integer in the fraction and continue.

1/3 x 2 = 2/3 < 1 0.10
2/3 x 2 = 4/3 = 11/3 > 1 0.101
1/3 x 2 = 2/3 < 1 0.1010

Note that the last row of the table is a repeat of an earlier row. The result is a repeating pattern: 0.101010... Binary to decimal system conversions and vice versa are fun. I find myself doing them sometimes even while listening to music. You can do the same. Gottfried Leibniz wrote an article about 300
years ago
on the usefulness of binary arithmetic. You will find the discussion on chinese figures of fuxi interesting.

conversion exercise in decimal and binary systems, part 1 :whole numbers

follow me on twitter, @emeka_david or be a friend on facebook, nnaemeka david