Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › numbers stored in a computer format
New Posts  All Forums:Forum Nav:

numbers stored in a computer format

post #1 of 2
Thread Starter 
Ok well my programming teacher has decided we need to know how to represent a number int a certain format. Such as what is a integer type number of 3 stored as?

The 2 types he wants us to know are doubles and ints

Someone want to explain this to me lol

his examples were

-.1 = 99999AFD

&

-7.75 = 84000003

Thank you.
    
CPUMotherboardGraphicsRAM
Intel Core i7 930 [4.33 Ghz] EVGA X58 SLI LE EVGA GTS 450 [SLI] 6 GB DDR 3 OCZ 1600 [1T-7-8-7-18 @ 1474] 
Hard DriveOptical DriveOSMonitor
Vertex 2 [120 GB] + 4x WD Green 2 TB [Raid1] Samsung BD-R [12x] Microsoft Windows 7 Pro [x64] [3] Samsung SyncMaster 2233sw 
KeyboardPowerCaseMouse
I-rocks Corsair HX650 [650W] Lian Li PC K62 Logi 
Mouse Pad
Metallica 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel Core i7 930 [4.33 Ghz] EVGA X58 SLI LE EVGA GTS 450 [SLI] 6 GB DDR 3 OCZ 1600 [1T-7-8-7-18 @ 1474] 
Hard DriveOptical DriveOSMonitor
Vertex 2 [120 GB] + 4x WD Green 2 TB [Raid1] Samsung BD-R [12x] Microsoft Windows 7 Pro [x64] [3] Samsung SyncMaster 2233sw 
KeyboardPowerCaseMouse
I-rocks Corsair HX650 [650W] Lian Li PC K62 Logi 
Mouse Pad
Metallica 
  hide details  
Reply
post #2 of 2
99999AFD and 84000003 are in hex.

Their values are -.1 and -7.75 as you know using a SIGNED integer. As an unsigned integer, its values are 2576980733 and 2214592515

This shows what happens in binary: http://easycalculation.com/hex-converter.php
Ol' Sandy
(28 items)
 
"Zeus"
(12 items)
 
Elite Preview
(6 items)
 
CPUMotherboardGraphicsRAM
Intel Xeon E3-1230v3 Gigabyte GA-Z97X-UD5H-BK MSI Gaming GTX 980 Kingston 32GB (4x8) 
Hard DriveHard DriveHard DriveHard Drive
Plextor PX-256M5S 256GB Samsung EVO 1TB Hitachi HDS721010CLA332 Hitachi HDS723020BLA642 
Hard DriveHard DriveHard DriveOptical Drive
Hitachi HDS723020BLA642 Hitachi HUA722010CLA330 WDC WD10EARS-00Z5B1 TSSTcorp CDDVDW SH-S223B 
CoolingCoolingOSMonitor
Phanteks PH-TC14PE with TY-140's Lamptron FCv5 (x2) Windows 8 Pro 64-bit Dell U2412M 
MonitorMonitorMonitorKeyboard
Dell U2412M Dell U2212HM Dell U2713HM Topre Realforce 87UB | Ducky DK9087 G2 Pro 
PowerCaseMouseMouse Pad
Corsair AX-750 Corsair Obsidian 650D Logitech G700 XTRAC Ripper XXL 
AudioAudioAudioAudio
Beyerdynamic DT-770 Pro 250ohm Schiit Bifrost DAC Schiit Asgard 2 HiVi Swan M50W 2.1 
CPUMotherboardRAMHard Drive
Intel Xeon E5-2620 Super Micro X9SRL-F-B 128GB 1333MHz LSI 9271-8i 
OSPowerCase
VMware ESXi 5.5 SeaSonic SS-400FL2 Fractal Define R3 
CPUMotherboardGraphicsRAM
Intel Core i5-3437U HP EliteBook Folio 9470m  Intel HD Graphics 4000  16GB DDR3 SDRAM 
Hard DriveOS
256GB SSD Windows 10 Insider Preview 
  hide details  
Reply
Ol' Sandy
(28 items)
 
"Zeus"
(12 items)
 
Elite Preview
(6 items)
 
CPUMotherboardGraphicsRAM
Intel Xeon E3-1230v3 Gigabyte GA-Z97X-UD5H-BK MSI Gaming GTX 980 Kingston 32GB (4x8) 
Hard DriveHard DriveHard DriveHard Drive
Plextor PX-256M5S 256GB Samsung EVO 1TB Hitachi HDS721010CLA332 Hitachi HDS723020BLA642 
Hard DriveHard DriveHard DriveOptical Drive
Hitachi HDS723020BLA642 Hitachi HUA722010CLA330 WDC WD10EARS-00Z5B1 TSSTcorp CDDVDW SH-S223B 
CoolingCoolingOSMonitor
Phanteks PH-TC14PE with TY-140's Lamptron FCv5 (x2) Windows 8 Pro 64-bit Dell U2412M 
MonitorMonitorMonitorKeyboard
Dell U2412M Dell U2212HM Dell U2713HM Topre Realforce 87UB | Ducky DK9087 G2 Pro 
PowerCaseMouseMouse Pad
Corsair AX-750 Corsair Obsidian 650D Logitech G700 XTRAC Ripper XXL 
AudioAudioAudioAudio
Beyerdynamic DT-770 Pro 250ohm Schiit Bifrost DAC Schiit Asgard 2 HiVi Swan M50W 2.1 
CPUMotherboardRAMHard Drive
Intel Xeon E5-2620 Super Micro X9SRL-F-B 128GB 1333MHz LSI 9271-8i 
OSPowerCase
VMware ESXi 5.5 SeaSonic SS-400FL2 Fractal Define R3 
CPUMotherboardGraphicsRAM
Intel Core i5-3437U HP EliteBook Folio 9470m  Intel HD Graphics 4000  16GB DDR3 SDRAM 
Hard DriveOS
256GB SSD Windows 10 Insider Preview 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › numbers stored in a computer format