Can a 16-bit machine perform operations on 64-bit data types?
I know that it can perform 32-bit multiplication using two registers, but do not have any idea about how it can handle 64-bit data?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
At the register/machine-code level there is invariably a carry flag that indicates when an arithmetic carry (or borrow) has occurred. This can be used to perform arithmetic operations on an arbitrary number of machine words. It does not necessarily require additional registers since RAM may be used for intermediate storage.
The wider the data type in relation to the machine word, the more instructions are required to perform any particular operation. Performance may also be hit by the need to use RAM rather than registers, so architectures with small or non-orthogonal register sets may perform such operations even slower and require more instructions.
A high level language may provide direct support for such operations. The C language data type
long longis typically 64 bit, though you would need to check whether your compiler supports it and what size it is in that implementation. If your compiler provides the C99 stdint.h header and that in turn includes theint64_tdata type (and its variants), then the compiler is implicitly capable of generation code for 64 bit operations. Code size, memory usage, and execution time are likley increase of course.In most C implementations the
doubledata types is 64 bit, even on targets with no FPU.