473,395 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How does a 32 bit windows OS have a calculator that can sum numbers bigger than Long?

Hi ppl
A simple question! I'm afraid it can be a bit silly, but I'm not an experienced programmer
How does a 32 bit windows OS, comes with a calculator where you can sum really big numbers, over the limit of 32 bit integer (2,147,483,647).
The problem is I want to make a calculator in C#. I know a solution would be use Long Int, but what if I want to add numbers even bigger than Long Int?
So consider a solution without using Long Int.
Don't be stressed about this, as it's not for a job, or academic work, it's just i can't understand how the calculator does that in a 32 bit OS, and it can't be done in programming languages (at least strait x+z=y), so there must be a workaround !
Thanks in advance! And sorry if the question is silly
Nov 5 '10 #1
1 2615
Banfa
9,065 Expert Mod 8TB
Well the calculator in Windows, AFAIK, does maths up to 64 bits and for a very long time the Microsoft C/C++ compiler has had a proprietary 64bit integer type __int64 and I always assumed that the calculator used that.

Doesn't C# use .NET and doesn't .NET have a 64bit type?

However if you want to have more than 64bits in an integer it is fairly easy to write a class that will support an integer of any bit length.

And in fact there are a number of such classes available on the internet in various languages including C# (search for BigInt).

The basic strategy is to store digits in the class and then perform the arithmetic on those digits much as you did sums when you were at school. You can choose a very high base for your digits (say base 65536) which can make the class fairly efficient when using small numbers as well as able to deal with large numbers.
Nov 5 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: mscertified | last post by:
Does a Windows desktop application (not a web app) written with .NET require the .NET framework be installed on the users machines?
3
by: Kevin Ollivier | last post by:
Hi all, On Windows, it's very common to have a string of long directories in the pathname for files, like "C:\Documents and Settings\My Long User Name\My Documents\My Long Subdirectory...
0
by: NiNiT | last post by:
I need to display embedded Windows Media Player plugin inside a browser that fetches its video over HTTPS. Is that possible? In other words, does Windows Media Player embedded plugin support...
21
by: raylopez99 | last post by:
Well, contrary to the implication in my 2000 textbook on C# (public beta version), C# does allow multiple inheritance, so long as it's serially chained as follows: class derived02 : derived01 {...
0
by: walsug | last post by:
hello, I'm engaged in some code migration work,in linux the EUC-jp and Shift-JIS encoding are supported and configurable by LANG. Does windows offer this support? -yogo
0
by: Studlyami | last post by:
I am trying to find how windows translate the input from a HID device to an actual windows message; specifically, the mouse. I am trying to figure out how when the mouse moves the process windows...
1
by: Ostrenko | last post by:
Hello all, I developed dll in Intel C++ that applies long double arithmetic operations. My dll allocates 128 bit for each long double variable and performs 19 digits precision operations if I...
1
Niheel
by: Niheel | last post by:
Recently few servers that I maintain for clients are taking a long time to authenticate when I try to SSH into them. Does anyone have any reason why this is happening? and is there a fix?
0
by: arsh | last post by:
how can i fetch the answer from windows calculator in a textbox using vb.net?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.