I am doing one of the tutorial in CS2100 in **NUS** SoC and one of the questions require us to convert between binary and gray codes.

I have decided to write a simple tutorial on how to convert from binary to gray codes.

**What is Gray Code?**

*“….is a binary numeral system where two successive values differ in only one bit. The reflected binary code was originally designed to prevent spurious output from electromechanical switches.”*

~http://en.wikipedia.org/wiki/Gray_code

**What is Binary Code?**

*A binary code represents text or computer processor instructions using the binary number system’s two binary digits, 0 and 1.*

~http://en.wikipedia.org/wiki/Binary_code

Before we start, lets look at an Exclusive OR, XOR(sometimes EOR gate, or EXOR gate)’s truth table.

The whole concept on how to do the conversion between the 2 number system heavily uses the XOR truth table.

Its been a month plus since I ORD’ed and matriculated into National University of Singapore(NUS). You can refer to my ORD post here (ORD LO). Week 0 was on 5 August 2013 and our official lessons started a week later on 12 August 2013. First 2 weeks are purely just lectures and sectional teaching(just like lectures) and during these 2 weeks, we are bidding for our tutorials and lab slots. This semester is 13 weeks long for me(inclusive of 1 week eLearning and 1 week recess week(on week 7)).

In my first semester of year 1, I took the following modules.

- MA1301 – INTRODUCTORY MATHEMATICS
- CS1020 – DATA STRUCTURES AND ALGORITHMS I
- CS2100 – COMPUTER ORGANISATION
- IS1105 – STRATEGIC IT APPLICATIONS
- SSA2209 – GOVERNMENT AND POLITICS OF SINGAPORE

Besides CS2100 which I spent 211 points to bid for it from my Programme Account and SSA2209 which I spent 50 points. The rest were pre-allocated and 1 points for each were deducted from my Programme Account. Its interesting how we have to fight for the modules that we would want to take. This is something very different from what we have in polytechnic.

I am entering week 5, which is the e-learning week for this semester. I would say that the whole ecosystem of NUS is very different from Temasek Polytechnic. No more caregroup system, you are now “given more responsibility” for your own education. No more checking of homework by tutors, if you do not participate actively in class and finish up the tutorials, you are going to pile up your backlogs and before you know it, its already exam.

To end off, some useful links that would benefit a new student or existing undergraduate.

**Useful links**

NUS MyISIS

NUS IVLE

NUS Email Login

NUS SoC Email Login

NUS CORS

NUS SoC CodeCrunch

NUSMods

SoC Undergraduates – Useful Course Schedule

NUS Library Portal

NUS Library Portal – Exam Papers

uTown Facilities Booking

Will update this blog more often! Time to change a theme!