ABG0908 / CS-201-Assignment-2

Assignment 2 on Number Systems

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CS-201-Assignment-2

Assignment 2 on Number Systems DataStructures Course Code: CS 201 National Institute of Technology, Silchar

Submitted by- Abhigyan Ballav Baruah 2012133 CSE Sec-B

Questions:

Since ancient times, the ability to represent numbers and perform arithmetic operations on numbers played an important role. Hence, it is interesting to study how different representation formats impact the number representation and operations. In this experiment, we study the efficacy of various number representation formats. The central message of this experiment is to appreciate that something that is as common as operating on numbers has an embedded data structure lesson. In this experiment, we will first understand how operations such as addition and multiplication can be done in various formats. We focus on four formats: unary, binary, decimal, and Roman. In each of these four representation formats, we will learn how to perform the above two operations. You can look at the lecture notes, browse through slides, and also see an animation that can run several examples.

{1} The Hindu/Arabic System : This is also known as the decimal system and is presently in vogue in written communication. The system used 10 digits 0, 1, 2, , 9. For instance three ⋯, 9. For instance three hundred and sixty seven is written as 367. This is a positional number system with the right most position having a weight of 1, the next position a weight of 10, and so on.

{2} The Roman System : This is a system using the symbols I, V, X, L, C, and M. This is not a positional system. As an example, 24 is written as XXIV.

{3} The Unary and the Binary System : In the former, the only symbol used is I and a number is represented by writing a number of I ́s equal to its value. For example, 7 is written as IIIIIII. It can be noticed that this system is too laborious for large numbers such as those beyond 20 or so. In the latter, two symbols 0 and 1 are used. This is a positional system with weights of 1, 2, 4, and so on. For instance, 55 is written as 110111. The latter is popular because of its use in the present generation computers.

About

Assignment 2 on Number Systems


Languages

Language:C 100.0%