Data structure for representing numbers, Data Structure & Algorithms

Your first task will be to come up with an appropriate data structure for representing numbers of arbitrary potential length in base 215. You will have to deal with large negative numbers also1. (Any negative number is to be stored in such a way that the most significant digit is a -1, but all lower order digits are positive. Note that you will need to make sure that you don't have a multi-digit number with 0 as the high order digit. Also, you are required to make sure that the top two high order digits of any number store are not -1,32767. If you have trouble figuring out why, come see me...) You need to write a function that takes a given file that contains a number in base 10, reads it in, and stores it in your data structure in base 215.

Posted Date: 3/20/2013 2:32:37 AM | Location : United States







Related Discussions:- Data structure for representing numbers, Assignment Help, Ask Question on Data structure for representing numbers, Get Answer, Expert's Help, Data structure for representing numbers Discussions

Write discussion on Data structure for representing numbers
Your posts are moderated
Related Questions
Arrays :- To execute a stack we need a variable called top, that holds the index of the top element of stack and an array to hold the part of the stack.

Multiplication Method: The multiplication method operates in 2 steps. In the 1ststep the key value K is multiplied by a constant A in the range O

What do you mean by hashing? Hashing gives the direct access of record from the file no matter where the record is in the file. This is possible with the help of a hashing func


Question 1. How can you find out the end of a String? Write an algorithm to find out the substring of a string. 2. Explain the insertion and deletion operation of linked lis

How do you find the complexity of an algorithm?  Complexity of an algorithm is the measure of analysis of algorithm. Analyzing an algorithm means predicting the resources that

What is Algorithm A finite sequence of steps for accomplishing some computational task. An algorithm should Have steps which are simple and definite enough to be done

Prove that uniform cost search and breadth- first search with constant steps are optimal when used with the Graph-Search algorithm (see Figure). Show a state space with varying ste

Data Structure and Algorithm 1. Explain linked list and its types. How do you represent linked list in memory? 2. List and elucidate the types of binary tree. 3. Descr

c program to represent a graph as an adjacency multilist form