473,748 Members | 2,621 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2631
Banfa
9,065 Recognized Expert Moderator Expert
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
1455
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
2457
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 Name\...". For a wxPython application I'm working on, this has actually caused me to run into what appears to be Python's pathname length limit for opening files. (247 chars on Win) Yes, I can hear people saying "yipes!" but this stuff does happen...
0
1712
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 HTTPS. The HTML code generated by my aspx page is the following : <object id="NSPlay" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://www.microsoft.com/netshow/download/en/nsasfinf.cab#Version=2,0,0,912" viewastext=""...
21
2481
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 { } class derived01 : baseclass01
0
1687
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
2308
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 takes in order to ensure all windows receive the notification that the mouse moved and how windows moves the mouse cursor. What process handles the movement of the mouse cursor and at what point does windows move the mouse cursor vs posting the...
1
3163
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 use C++ or Delphi host application. In case of C# host application the dll allocates 128 bit also but number of significant digits is reduced to 15 (same with double). How does it possible and what do I have to do to increase a number of...
1
3911
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
1277
by: arsh | last post by:
how can i fetch the answer from windows calculator in a textbox using vb.net?
0
8996
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8832
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9333
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8255
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.