Questions tagged [16-bit]

Referring to computer architecture with addresses and other data units 16 bits wide.

In computer architecture, 16-bit integers, memory addresses, or other data units are those that are at most 16 bits (2 octets) wide. Also, 16-bit CPU and ALU architectures are those that are based on registers, address buses, or data buses of that size.

414 questions
49
votes
9 answers

Why is there no 2-byte float and does an implementation already exist?

Assuming I am really pressed for memory and want a smaller range (similar to short vs int). Shader languages already support half for a floating-point type with half the precision (not just convert back and forth for the value to be between -1 and…
Samaursa
  • 16,527
  • 21
  • 89
  • 160
29
votes
7 answers

What are 16, 32 and 64-bit architectures?

What do 16-bit, 32-bit and 64-bit architectures mean in case of Microprocessors and/or Operating Systems? In case of Microprocessors, does it mean maximum size of General Purpose Registers or size of Integer or number of Address-lines or number of…
user366312
  • 16,949
  • 65
  • 235
  • 452
27
votes
3 answers

Getting Embedded with D (the programming language)

I like a lot of what I've read about D. Unified Documentation (That would make my job a lot easier.) Testing capability built in to the language. Debug code support in the language. Forward Declarations. (I always thought it was stupid to declare…
NoMoreZealots
  • 5,274
  • 7
  • 39
  • 56
26
votes
7 answers

How to execute 16-bit installer on 64-bit Win7?

I am trying to install Sheridan controls (ActiveThreed 2.01) on Win7 64-bit, but evidently it is a 16-bit installer so it won't execute. What would be the best way to get round this problem? Can anyone comment on whether…
CJ7
  • 22,579
  • 65
  • 193
  • 321
25
votes
4 answers

Define 16 bit integer in C

I need to declare an integer in the size of 16 bit, in C. I know that short and int sizes are machine dependent. I tried to use "stdint.h", but it seems that they simply do typedef short int16_t So my question is: Am I missing something and short…
sara
  • 3,824
  • 9
  • 43
  • 71
23
votes
6 answers

What does OFFSET in 16 bit assembly code mean?

I am going through some example assembly code for 16-bit real mode. I've come across the lines: mov bx, cs mov ds, bx mov si, OFFSET value1 pop es mov di, OFFSET value2 what is this doing? What does having…
Without Me It Just Aweso
  • 4,593
  • 10
  • 35
  • 53
20
votes
6 answers

How to use high and low bytes?

I am trying to represent 32768 using 2 bytes. For the high byte, do I use the same values as the low byte and it will interpret them differently or do I put the actual values? So would I put something like 32678 0 or 256 0? Or neither of those?…
Sterling
  • 201
  • 1
  • 2
  • 3
20
votes
5 answers

16 bit Int vs 32 bit Int vs 64 bit Int

I've been wondering this for a long time since I've never had "formal" education on computer science (I'm in highschool), so please excuse my ignorance on the subject. On a platform that supports the three types of integers listed in the title,…
arturovm
  • 1,215
  • 2
  • 12
  • 28
17
votes
5 answers

Numpy and 16-bit PGM

What is an efficient and clear way to read 16-bit PGM images in Python with numpy? I cannot use PIL to load 16-bit PGM images due to a PIL bug. I can read in the header with the following code: dt = np.dtype([('type', 'a2'), …
mankoff
  • 2,225
  • 6
  • 25
  • 42
16
votes
6 answers

How did 16-bit C compilers work?

C's memory model, with its use of pointer arithmetic and all, seems to model flat address space. 16-bit computers used segmented memory access. How did 16-bit C compilers deal with this issue and simulate a flat address space from the perspective…
dsimcha
  • 67,514
  • 53
  • 213
  • 334
16
votes
6 answers

Converting Win16 C code to Win32

In general, what needs to be done to convert a 16 bit Windows program to Win32? I'm sure I'm not the only person to inherit a codebase and be stunned to find 16-bit code lurking in the corners. The code in question is C.
Zathrus
  • 9,948
  • 2
  • 25
  • 22
15
votes
4 answers

Python and 16 Bit Tiff

How can I convert and save a 16 bit single-channel TIF in Python? I can load a 16 and 32 bit image without an issue, and see that the 32 bit image is mode F and the 16 bit image is mode I;16S: import Image i32 = Image.open('32.tif') i16 =…
mankoff
  • 2,225
  • 6
  • 25
  • 42
15
votes
3 answers

How does C++ integer division work for limit and negative values?

I am facing some strange results with integer division in C++. I am trying to calculate this: -2147483648 / -1. What I get is 3 different results in 3 different scenarios: int foo(int numerator, int denominator) { int res = numerator /…
Kareem Ergawy
  • 647
  • 1
  • 8
  • 17
14
votes
1 answer

C# bitwise shift on ushort (UInt16)

I need to perform a bitwise left shift on a 16-bit integer (ushort / UInt16), but the bitwise operators in C# seem to apply to int (32-bit) only. How can I use << on an ushort, or at least get to the same result with a simple workaround?
KBoek
  • 5,794
  • 5
  • 32
  • 49
11
votes
3 answers

Java error on bilinear interpolation of 16 bit data

I'm having an issue using bilinear interpolation for 16 bit data. I have two images, origImage and displayImage. I want to use AffineTransformOp to filter origImage through an AffineTransform into displayImage which is the size of the display…
Jon
  • 3,985
  • 7
  • 48
  • 80
1
2 3
27 28