Not signOne quarter
ASCII 172 is ¬ on Windows and ¼ in old DOS.
¬ (Not Sign) is byte 172 in Windows-1252, Unicode U+00AC. Logic and maths use it for negation, and UK keyboards give it a key of its own, top left beside 1. On the web it causes a classic bug. ¬ is one of the old HTML entities that browsers recognize even without a semicolon, so a URL like ?id=5¬ify=1 written into a page as visible text, with the & unescaped, displays as ?id=5¬ify=1. Inside an href attribute browsers leave it alone, which is why the link still works while the text shown on the page is wrong. Escape & as & in text. Old DOS had ¬ too, at 170. In UTF-8 it's C2 AC, and the HTML entity is ¬.
¼ (One Quarter) is byte 172 in code page 437, the original IBM PC character set, and maps to Unicode U+00BC. Windows-1252 has the not sign ¬ at 172, so DOS text read as Windows-1252 turns a ¼ inch drill bit into a ¬ inch one. Code page 850 kept ¼ at 172 too, right after ½ at 171.
#include <stdio.h>int main(void) {/* On Windows (code page 1252) byte 172 is ¬.Modern terminals expect UTF-8, so print the code point, not the byte. */printf("\u00AC\n"); /* UTF-8: C2 AC */unsigned char b = 172; /* the raw Windows-1252 byte */printf("%d 0x%02X\n", b, b); /* 172 0xAC */return 0;}
#include <stdio.h>int main(void) {/* Byte 172 is ¼ only on a console using code page 437(chcp 437 on Windows, or DOSBox). On a UTF-8 terminal thelone byte 0xAC is invalid and prints as garbage, often �. */putchar(172);/* char is signed on x86, so a plain char holding 0xAC is -84.Use unsigned char when you compare or index by byte value. */char c = (char)172;unsigned char u = 172;printf("\n%d %d\n", c, u); /* -84 172 *//* Portable: print the Unicode character as UTF-8 instead. */printf("\u00BC\n"); /* C2 BC */return 0;}
¼ is also ASCII 188 on Windows, which has the full guide.
Yes in logic, where they're two notations for the same operator: ¬ is the standard modern one, and ~ turns up in older texts like Principia Mathematica. In code they differ. C-style languages use ! for logical not and ~ for flipping every bit, so ~1 gives -2 where !1 gives 0. In LaTeX, ¬ is `\neg` or `\lnot`.
Windows is using the US layout for your UK keyboard. On US settings that key gives ` and ~, Shift+2 gives @ instead of ", and Shift+3 gives # instead of £. Add English (United Kingdom) as a keyboard layout in Windows' language settings, then switch to it with Win+Space.
Look at what comes right before it. € is a euro sign and ì is ì, both UTF-8 read as Windows-1252, where AC, the last byte of each, is ¬.
Both. Alt+170 looks the number up in the DOS code page, where ¬ sits at 170, and Alt+0172 uses Windows-1252, where it sits at 172. The one that fails is Alt+172 with no zero, which lands on ¼ in the DOS table. So the number this page is named after only gives ¬ with the zero in front.
Both. Alt+170 looks the number up in the DOS code page, where ¬ sits at 170, and Alt+0172 uses Windows-1252, where it sits at 172. The one that fails is Alt+172 with no zero, which lands on ¼ in the DOS table. So the number this page is named after only gives ¬ with the zero in front.