CPSC 355 Lecture Notes - Lecture 15: Negative Number, Extended Precision, C Dynamic Memory Allocation
Document Summary
Can be done using an iterated procedure similar to manual long division. Cpsc 355 - lecture 15 oct 17th: eg: 245 / 5 = 49. Early riscs used a similar technique, embodied in a callable library function: now done in hardware. Is used when you need more than 64 bits of precision. Archived by using two or more registers to represent a number: eg: 192-bit unit uses 3 registers. Extended precision numbers can be added together: x19 x20 x21 x22 x23 x24, procedure: Set the c flag to 0 or 1. The adc and adcs instruction use the c flag when adding: eg: adds adcs adc x21, x21, x24 x26, x20, x23 x25, x19, x22. Subtraction is done in a similar way using the subs, sbcs, and sbc instructions. Armv8 uses 64-bit addresses: can address 264 bytes of memory. 0xffffffffffffffff: this is a virtual memory address space. Is mapped to physical memory by the os and hardware.