POV-Ray : Newsgroups : povray.off-topic : For Warp Server Time
5 Sep 2024 21:23:46 EDT (-0400)
  For Warp (Message 25 to 34 of 44)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: clipka
Subject: Re: For Warp
Date: 26 Jun 2009 13:35:02
Message: <web.4a45066530d22038a745f7570@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> Mueen Nawaz wrote:
> >     Think modems (the phone ones). In the old days, it was all baud. 1
> > baud is 1bit/s. It probably has stuck since.
>
> Technically, one baud is one symbol per second. A 9600bps modem is a 2400
> baud modem with 2 symbols per baud.

What? That's nonsense, the units don't match here. You probably mean 2 bits per
symbol.

But even after *prehistoric* times, when transmission was almost always binary
(i.e. 1 bit per symbol), the misconception of "baud = bps" stuck for quite a
while.


> >     Incidentally, I think with old modems, sending 1 byte didn't entail
> > sending 8 bits. I think they had two error correcting bits, making
> > sending 1 byte the same as 10 bits. If there's truth to that, I can see
> > why it'd make sense to specify bits.
>
> One or two start bits to synchronize, one stop bit (or sometimes 1.5 stop
> bits) to process, and perhaps a parity bit. No error correcting bits, but
> parity might give you error detection if you're lucky.

The parity would typically be used with only 7 data bits.


But as a matter of fact, Kilo-, Mega- and GigaBITS are actually a much more
natural unit of measuring information storage or transmission capacity.

It's not only commonly used with transmission media, but also in
microelectronics, where (except in the "computer proper" business) you'll
virtually never find storage capacity specified in multiples of bytes *except*
when the storage device happens to be designed to access 8 bits in parallel. In
all other cases, chips are usually specified either at multiples of bits, or
multiples of a data word (the number of bits accessed in parallel), which would
typically be 1, 4, 8 (sometimes 9) or 16 bits.

A 2G DDR2 memory module should actually be designated as a 32Mx64 module. Would
be hard to explain to the customers, who are almost invariably locked with the
concept of a byte as the smallest unit of memory.

Happens to hardcore software developers, too. I once had some problems figuring
out why some intended-to-be-portable C software library I had developed didn't
run properly on a particular microcontroller - until finding out that a "char"
data type (the smallest data type in C, typically equalling a byte) was
actually 16 bits wide on that rascal. "A byte? What's that, Sir?" Doesn't make
life easier when you're developing a portable library for a communications
interface heavily based on the concept of the 8-bit thing.


Post a reply to this message

From: Darren New
Subject: Re: For Warp
Date: 26 Jun 2009 14:05:19
Message: <4a450ddf$1@news.povray.org>
clipka wrote:
> Darren New <dne### [at] sanrrcom> wrote:
>> Mueen Nawaz wrote:
>>>     Think modems (the phone ones). In the old days, it was all baud. 1
>>> baud is 1bit/s. It probably has stuck since.
>> Technically, one baud is one symbol per second. A 9600bps modem is a 2400
>> baud modem with 2 symbols per baud.
> 
> What? That's nonsense, the units don't match here. You probably mean 2 bits per
> symbol.

Yes, sorry. Two bits per symbol aka two bits per baud.

> But even after *prehistoric* times, when transmission was almost always binary
> (i.e. 1 bit per symbol), the misconception of "baud = bps" stuck for quite a
> while.

Yes.  Except, of course, in the phone company, where it actually made a 
difference. :-)

> The parity would typically be used with only 7 data bits.

Usually, yes. Usually either 8-N-1 or 7-?-2, IME.

> all other cases, chips are usually specified either at multiples of bits, or
> multiples of a data word (the number of bits accessed in parallel), which would
> typically be 1, 4, 8 (sometimes 9) or 16 bits.

Yep. What about the serial type chips, like SD cards and stuff? How do they 
get rated technically, do you know?

> run properly on a particular microcontroller - until finding out that a "char"
> data type (the smallest data type in C, typically equalling a byte) was
> actually 16 bits wide on that rascal.

Yeah. This is why Ada has different types for "a memory unit" and "an I/O unit".

-- 
   Darren New, San Diego CA, USA (PST)
   Insanity is a small city on the western
   border of the State of Mind.


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: For Warp
Date: 26 Jun 2009 16:00:00
Message: <4a4528c0@news.povray.org>
Darren New wrote:
> Warp wrote:
>> Darren New <dne### [at] sanrrcom> wrote:
>>> I didn't mean to single you out personally in any way. I just thought
>>> you'd be amused that the two search engines couldn't agree. :-)
>> 
>>   The question remains: Which one is correct?
> 
> I find it interesting that google thinks 1024 meg is a gig, and wolfram
> thinks 1000 meg is a gig. :-) 

Maybe Wolfram thinks 1000 megabytes are a gigabyte, and 1024 mibibytes are a
gibibyte?


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: For Warp
Date: 26 Jun 2009 16:00:01
Message: <4a4528c1@news.povray.org>
clipka wrote:
> Happens to hardcore software developers, too. I once had some problems
> figuring out why some intended-to-be-portable C software library I had
> developed didn't run properly on a particular microcontroller - until
> finding out that a "char" data type (the smallest data type in C,
> typically equalling a byte) was actually 16 bits wide on that rascal. "A
> byte? What's that, Sir?" Doesn't make life easier when you're developing a
> portable library for a communications interface heavily based on the
> concept of the 8-bit thing.

A C 'char' type MUST be exactly 1 byte long (in particular, sizeof(char)
MUST be 1). However, a C implementation may define "byte" with more than 8
bits.


Post a reply to this message

From: Warp
Subject: Re: For Warp
Date: 27 Jun 2009 03:40:05
Message: <4a45ccd5@news.povray.org>
Nicolas Alvarez <nic### [at] gmailcom> wrote:
> clipka wrote:
> > Happens to hardcore software developers, too. I once had some problems
> > figuring out why some intended-to-be-portable C software library I had
> > developed didn't run properly on a particular microcontroller - until
> > finding out that a "char" data type (the smallest data type in C,
> > typically equalling a byte) was actually 16 bits wide on that rascal. "A
> > byte? What's that, Sir?" Doesn't make life easier when you're developing a
> > portable library for a communications interface heavily based on the
> > concept of the 8-bit thing.

> A C 'char' type MUST be exactly 1 byte long (in particular, sizeof(char)
> MUST be 1). However, a C implementation may define "byte" with more than 8
> bits.

  Does the C standard use the word "byte", or does it simply say that
sizeof(char) must always be 1 (without specifying a name for the unit)?

  Of course if you need to take into account the amount of bits in your
integral types (including char) and you want your C program to be fully
portable even to exotic embedded systems, you have to use the CHAR_BIT
constant defined in limits.h rather than assume it's always 8.

-- 
                                                          - Warp


Post a reply to this message

From: Mueen Nawaz
Subject: Re: For Warp
Date: 27 Jun 2009 09:24:21
Message: <4a461d85$1@news.povray.org>
On 06/26/09 11:13, Darren New wrote:
> Mueen Nawaz wrote:
>> Think modems (the phone ones). In the old days, it was all baud. 1
>> baud is 1bit/s. It probably has stuck since.
>
> Technically, one baud is one symbol per second. A 9600bps modem is a
> 2400 baud modem with 2 symbols per baud.

	Fine, be picky.<G>

	I was taught it meant 1 cps (character per second) - which could have 
been 1 bit/s, but not necessarily. I suppose character is the same as 
your symbol.

	It's just that in all the contexts that _I've_ used it, a baud was 1bit/s.


-- 
DO NOT REMOVE THIS TAG (UNDER PENALTY OF LAW)


                     /\  /\               /\  /
                    /  \/  \ u e e n     /  \/  a w a z
                        >>>>>>mue### [at] nawazorg<<<<<<
                                    anl


Post a reply to this message

From: Darren New
Subject: Re: For Warp
Date: 27 Jun 2009 12:35:59
Message: <4a464a6f$1@news.povray.org>
Warp wrote:
>   Does the C standard use the word "byte", or does it simply say that
> sizeof(char) must always be 1 (without specifying a name for the unit)?

It says byte, which is the smallest addressable unit of memory.

http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf

That's why RFCs talk about octets and not bytes.

-- 
   Darren New, San Diego CA, USA (PST)
   Insanity is a small city on the western
   border of the State of Mind.


Post a reply to this message

From: Darren New
Subject: Re: For Warp
Date: 27 Jun 2009 12:37:36
Message: <4a464ad0$1@news.povray.org>
Mueen Nawaz wrote:
> On 06/26/09 11:13, Darren New wrote:
>> Mueen Nawaz wrote:
>>> Think modems (the phone ones). In the old days, it was all baud. 1
>>> baud is 1bit/s. It probably has stuck since.
>>
>> Technically, one baud is one symbol per second. A 9600bps modem is a
>> 2400 baud modem with 2 symbols per baud.
> 
>     Fine, be picky.<G>

Hey, I worked for the guy who invented the 9600 bps modem. I had to be 
picky. :-)

>     I was taught it meant 1 cps (character per second) - which could 
> have been 1 bit/s, but not necessarily. I suppose character is the same 
> as your symbol.

Probably. The symbol is the smallest unit at the physical layer.

>     It's just that in all the contexts that _I've_ used it, a baud was 
> 1bit/s.

Yes, incorrectly so. :-) I still talk about 9600baud modems, unless i'm 
being picky

-- 
   Darren New, San Diego CA, USA (PST)
   Insanity is a small city on the western
   border of the State of Mind.


Post a reply to this message

From: Warp
Subject: Re: For Warp
Date: 27 Jun 2009 13:44:56
Message: <4a465a98@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> It says byte, which is the smallest addressable unit of memory.

> http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf

  It's interesting that the standard doesn't specify how many bits there
should be in a byte (as it shouldn't), but later it specifies that the
maximum value an unsigned char type should be able to hold is 255, so
it's indirectly saying that a byte should be at least 8 bits. Likewise
it gives a minimum value of 8 for CHAR_BIT.

  I suppose that if there exists a system with bytes smaller than 8 bits,
a C compiler for that system would slightly break the standard by necessity
(well, unless the 'char' type is made to consist of more than one physical
byte).

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: For Warp
Date: 27 Jun 2009 13:47:34
Message: <4a465b36@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> but later it specifies that the
> maximum value an unsigned char type should be able to hold is 255

  Of course I meant to write "at least" in between there.

-- 
                                                          - Warp


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.