Obscure differences between Kanji and Chinese characters

People who already know Chinese characters are often said to have the advantage of being able to pick up Japanese quickly. However, to learn it properly, in addition to the  difference between infix (English, Chinese) and reverse polish (Japanese) notations, it also comes with quite a bit of baggage. It’s the differences that requires work to observe, such as:

  • some made up ‘Chinese’ characters (和製漢語),
  • some are written slightly differently, including artistic variations
  • some has a completely different meaning,
  • some has opposite preferences for using which character in the pair when simplifying
  • and some has drastically different overtones despite they technically mean the same thing
  • the mixture of simplified and traditional characters, occasionally a character written like simplified Chinese means something totally different from traditional Chinese, such as 机(つくえ)which means desk vs 機(キ)which means machines or chances depending on the context.
  • the roles of historical and modern writings are randomly reversed

学習 is a good example. Modern Chinese considers 学 to be more colloquial (e.g. 学武功)and 習 to be more formal (e.g. 習武). Japanese is the other way round for 学ぶ and 習う。学ぶ has a more serious tone.


Actually, the kinds of variations mentioned above applies to regional differences in Chinese languages (such as Taiwanese, Cantonese and Mandarin). Most places agree to write Chinese in a way that can be read directly using Mandarin so that we can at least communicate on paper. So as time goes by, we lost the ability to write in Taiwanese and Cantonese. I hope it’ll change as both dialects are very colorful. Re-expressing them in Mandarin will take away all the flavors in them.

It’s evident that humans can pick up more than one language, so there is no reason to compromise dialects in the process of standardization. People advocating to kill other languages are simpletons who believe in the kind of logic supporting a competitive system: you find ways to make your peers do worse to stay ahead, instead of improving yourself.

Different regions occasionally have different preferences for character order in phrases. Basically we have to watch out for all kinds of combinations. Like 介紹 is used in the same order for Taiwanese/Cantonese/Mandarin to mean introduction, but it’s reversed 紹介(しょうかい) in Japanese. To make it a total mindfuck, Mandarin sticks with 客人 for guests, which is used the same way as Japanese’s 客人(きゃくにん), Taiwanese mostly says 人客, while Cantonese uses both with slight overtones: 客人 is usually used as a particular noun (e.g. 呢位客人) while 人客 is often used as a collective noun (e.g. 人客嚟齊未?), most likely because 客人 sounds more formal than 人客.


Putting traditional and simplified Chinese aside, different regions have different preferences for Chinese characters. I couldn’t tell the difference between traditional Chinese characters used in Hongkong/Macau (港澳繁體) and Taiwan (台灣正體) on Wikipedia, and later learned that it was because I’ve been randomly mixing both all along and nobody ever pointed it out.

裏/着 (Hongkong) vs 裡/著 (Taiwan) are good examples. For these two, modern Japanese sided with Hongkong in the character choices for 裏(うら) and 着(ちゃく). On the other hand, 峰(みね) in Japanese sided with the Taiwanese’s preferred writing 峰, while the 峯 is the ‘officially’ preferred writing in Hongkong.

I remember writing 峰 most of the time even when I was a kid and only used 峯 for names that specifically calls for it. We respect the original writing for names. This is the similar situation as in Japanese: 沢(さわ/たく) is used in most cases and reserve 澤(サワ) for names that specifically requests to be written in this form. The only difference is that I used the official character 峯 exclusively for names, while using the off-label 峰 for the rest.

Speaking of names, there are some similar-looking characters that has the same Japanese sound (かな) but are actually different in both writing and meaning. 斉藤 and 斎藤 are different, but they are easily confused for native Japanese speakers who don’t have any Chinese language background. Here’s the table for comparison:

齊/齐・斉 齋/齋・
Meaning Gathered, organized Plain, house, recitations
Cantonese chai (cai4) jaai (zaai1)
Taiwanese tsè tsai
Mandarin qi2 zhai1
Japanese (音読み:さい) 斉しい・等しく いつき・(潔斎)物忌み

The bottom line is: as language evolves, different regions have different preferences about what can they be sloppy about and what they must be meticulous about. They also reorder/tweak things to make them flow smoothly with their dialect. This means traps for for those learning a new language that are close to what they’ve already mastered.

I came across a document called 常用漢字表 released by the Agency for Cultural Affairs (文化庁) that explains all the quirks of Kanji that was carefully collecting on my own while taking the classes. Wish I had it back in the days. Here’s the link, but I also saved a local copy of 常用漢字表 just in case if their website moves around in the future.

Loading

Malware deleting TrustedInstaller.exe, therefore crippling Windows

My sister’s computer is was infected with a bunch of stubborn malware. Even after cleaning the offending files, a lot of things won’t wouldn’t work.

Windows Update, run sfc /scannow, or DISM /Online /Cleanup-Image fails with unknown reasons, which I found it somehow related to “Windows Module Installer” service not running.

I saw something weird in services.msc: “Windows Module Installer” doesn’t exist, but I know the underlying name is “TrustedIntaller” and noticed a service named as such is there, but it cannot be started, nor there are any descriptive information.

So I searched registry for “TrustedInstaller” and got to its entry. I noticed these two:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\TrustedInstaller]
"DisplayName"="@%SystemRoot%\\servicing\\TrustedInstaller.exe,-100"
"Description"="@%SystemRoot%\\servicing\\TrustedInstaller.exe,-101"

It means the meaningful names and descriptions I saw on services.msc are generated by calling the underlying  service executable file with switches. I checked my “C:\Windows\servicing” and found that “TrustedInstaller.exe” is not there at all! Of course you cannot start a service where the file does not exist at the promised path (ImagePath).

I searched the hard drive and found only one instance of the file stored somewhere (like C:\Windows\winsxs\x86_microsoft-windows-trustedinstaller_31bf3856ad364e35_6.1.7600.16385_none_90e389a7ae7a4b6c) and I tried to move the file to “C:\Windows\servicing”. However the ownership and permissions to write to “C:\Windows\servicing” goes to “TrustedInstaller” account, not “Administrator”, so I took the ownership, gave Administrator full rights, then move the file over.

Everything worked after that! Just the mere trick of deleting TrustedInstaller.exe is enough to make the user miserable trying to clean the system up! “sfc /scannow” or the like requires TrustedInstaller/WIM to be working in the first place, so you cannot use it to repair TrustedInstaller/WIM problems.

Loading

Floppy Disk Drive Ribbon Cable Orientation

Hooking up a floppy drive after a decade of disuse today, I followed the notch/key on the connector/cable but it turns out to be incorrect! Turns out I should do the opposite, forcing the key to the side without the notch, by force (or trim the key)!

So stick with the conventional wisdom that the ribbon’s pin 1 (marked) should always stay close to the power connector, regardless of whether it’s IDE or FDD (3.5″ or 5.25″), EVEN IF FOOLPROOF MECHANISMS TELLS YOU OTHERWISE!

 

 

 

Loading

Option 005 “Vertical Output” port of 54600 series oscilloscopes (54616B, 54616C, etc) A secret backdoor feature that new oscilloscopes lack

Over the last year, I got a couple of requests for 54616B that specifically ask for a “vertical output” port at the back. I have never seen an oscilloscope that came with such a port, including a few hundred of first generation first generation 54600s I acquired from many different sources.

I got curious and looked it up. Turns out it’s a secondary feature of a relatively obscure option (only mentioned in the manuals, but I have never seen one) called Option 005, which lets you analyze (like count lines) and trigger over common TV signals, like PAL/NTSC/SECAM, which is way obsolete today. It also seems that none of the customers asking specifically for the “vertical output” port at the back know that it is a super rare option that is normally not included, so they must be using it for something else other than analog TV signal analysis.

A closer look at the user guide shows that “vertical output” port duplicates the signal source (e.g. channel 1) that the scope is triggering on, limited to what is seen by the oscilloscope, to the said “vertical output” port, a secondary feature to let you chain your signal to instruments like spectrum analyzers for further analysis.

I tried the feature myself by chaining the output to another oscilloscope. Even if the waveform is off-screen for the current vertical volts/div, the vertical output port waveform did not clip. I also played around with input impedance settings 1MΩ and 50Ω for a 50Mhz square wave. Based on what gets the square wave badly distorted, I can confirm that the vertical output signal is the analog signal after attenuator (the amplitude changes only with Volts/div that causes relay clicks) but before ADC, assuming a 50Ω load.

Wait! An oscilloscope that duplicates the input analog signals after being processed by the front end (post-attenuator, pre-ADC) to an external output port?! I don’t have to mess with the original signal path by splitting the signal (passively) or make an amplifier to duplicate the signal? Wow! How come it’s not standard (or at least a purchasable option) in modern oscilloscopes? I’d like to see what’s going on with the analog waveform before the scope processes it! Not only it’s very educational, it allows other instruments to get an accurate insight of what the oscilloscope is seeing. Neat!

Installing the Option 005 is not difficult if you happen to have an unobtainium Option 005 case with labels, and the entire kit with all the necessary interconnect. However, it’s like an unicorn and I’ve never seen one. Drilling professional looking holes for it is a nightmare as we don’t have the dimensions. The hardware is also insanely hard to get as it was made for a specialized crowd for the time and practically nobody cared about analog TV signals nowadays. Even if I can get that, they are most often missing the interconnects. The ribbon cable is missing for nearly all of them, and if you get a standard ribbon cable, you’ll realize the plastic retainer gets into the way of a screw on the main acquisition board so the Option 005 card won’t slide in unless you trim some of the plastic off. PITA!

Nowadays I am already spoiled by high end gears like MSO6054A and 13Ghz Infiniiums (like DSO81304A), but none of them has a convenient analog, post-attenuator output like a first generation 54600 with an Option 005. Given the hardware is scarce, I’ll save it for the top of the line first generation 54600 series, namely 54616B and 54616C.

For those who have this special need (need to tap into the pre-ADC signals up to 500Mhz), I can custom build these Option 005 units for you, depending on parts availability. Call me at 949-682-8145 or reach me at my business website www.humgar.com.

Loading

The mess converting decibels to voltages in test instruments (dBm, dBW, W, dbV, V)

Complex conversions between decibels and physical quantity has always been a rich source of confusion. The reason is that dB(something) is actually a loaded word with hidden assumptions:

  • dB always works on base-10
  • dB is always a relative (dimensionless) POWER quantity.
    The POWER quantity can be expressed in terms of non-power quantities (like voltages).
  • the scaling factor is always 10 for power.
    Adding one zero (multiply by 10) to the power ratio means +10dB.
  • dB(something) is always with respect to a quantity (the something), and the reference quantity is often not written in full. Since there is an implicit reference, db(something) can be mapped to absolute quantities.

If you are a diverse multi-disciplinary techie like me (math, electronics, programming, computers), it’d frustrate the hell out of you when you talk to people who has been working exclusively on a narrow field for at least a decade and they have a table of commonly used numbers in their memorized: they act like you are supposed to know how to get the numbers in the dB-variant that they use, than explaining to you what the field-specific assumptions are (likely because they forgot about it).

I hope this post will clear up the confusion by working out an example in test instrumentation, most commonly in RF as well, converting dBm to Volts.


Before I start, I’ll clarify the most common form of beginner confusion in EE and physics: converting between dB and voltages:

\mathrm{dB} = 20\log_{10}(V) = 10\log_{10}(V^2)

This looks like a definition of decibel, except the scaling factor is 20 magically for Volts. It is correct because we always work in power and power can be expressed as voltage-squared (resistances in the divisor cancel out if they are the same). Most people take it as an equivalent definition of decibels, and throw away these important assumptions behind it:

  • the reference is 1V,
  • and the resistance* (common to the voltage of interest and the reference voltage) gets cancelled

and run into troubles when they venture into those dB-variants like dBm. Technically the above should be written as dBV, but I have seen very few people use the clearer term.

The decibel formula for voltage came from

\mathrm{dBV} = 10\log_{10}(\frac{P}{P_{ref}})

where P = \frac{V^2}{R} and P_{ref} = \frac{1^2}{R}, you get

\mathrm{dBV} = 10\log_{10}(\frac{V^2/R}{1^2/R})

The R get cancelled out and you get

\mathrm{dBV} = 10\log_{10}(V^2)

People moved the squaring out and lumped (multiplied) it with the scaling factor 10:

\mathrm{dBV} = 20\log_{10}(V)

So the whole reason why it is 20 instead of 10 is simply because P\propto V^2, and \log(V^2) \equiv 2\log(V).


Now back to the business converting dBm to dBV or Volts.

First of all dBm is dB(mW), NOT dB(mV). The RF/telecom people are just too lazy to write out the most important part: the physical quantity expressly, because nearly all the time, it’s the power that matters to them.

However, I often need to connect a RF generator to a high bandwidth oscilloscope, so the very self-centered RF/telecom nomenclature start to become problematic when people of different fields need to talk to each other. Oscilloscope see everything in volts. RF sees everything in power, often in dB.

Then we get to the (mW) part, which means the reference quantity in the definition is 1mW, which is a physical quantity with dimensions. Then how are we going to convert it to Volts? You cannot jump to the shortcut formula I illustrated above with the 20 factor this time because the reference is in mW and your quantity is in Volts.

You’ll need to convert power to voltages. To do so, you’ll need to know voltages induced by power ‘dissipated’ through a ‘resistance’ across a component (load). The missing gap is that you will need to know the load ‘resistance’ before the conversion. With that, you can use P = V^2/R, or rewritten as V^2 = PR when it’s more convenient.

All RF-related test-instruments and bench function generators typically have a 50Ω output impedance, which means it also assumes a matching 50Ω as mathematically, it provides the maximum power transfer (sadly split evenly between the load and wasted at the instrument’s output impedance). For convenience, the amplitude you see in the instrument control panel refers to the amplitude you see at a 50Ω load, not what the instrument pumps out internally (that’s why you see 2Vpp when your function generator says 1Vpp if you hook it up to a low-end oscilloscope that serves 1MΩ by default).

Since we are dealing with continuous wave (not transient power), all amplitude quantities on RF test instruments are in RMS (power or voltage) unless otherwise specified. So the quantities we have for dBm is

\mathrm{dBm} = 10\log_{10}(\frac{P_{rms}}{1mW})

when written in terms of voltages,

\mathrm{dBm} = 10\log_{10}(\frac{V^{2}_{rms}/50Ω}{1mW})

Instead of splitting it into 3 terms and immediately grouping the constants, I’d like to first convert dBm to dBW:

\mathrm{dBW} = 10\log_{10}(P/1W)

\mathrm{dBm} = 10\log_{10}(P/0.001W) = 10(\log_{10}(P/1W) + \log_{10}(1000))

The linear quantity in dBm is artificially scaled 1000 times bigger than in dbW, to put it in a comfortable scale for us to work with smaller signals. Therefore dBm is always 30dB higher than dbW (the smaller the reference, the bigger the relative numbers look).

So back to the above in dBW, we subtract 30dB to get to dBW:

\mathrm{dBm} = \mathrm{dBW} + 30\mathrm{dB}

where

\mathrm{dBW} = 10\log_{10}(V^{2}_{rms}/50Ω)

We can separate the load and put it on the left hand side

\mathrm{dBW} + 10\log_{10}(50Ω) = 10\log_{10}(V^{2}_{rms})

The right hand side is dBV, and you can think of the load as scaling the power up (inducing) the voltage-squared quantity (V^2 = PR, or \log(V^2) = \log(P) + \log(R)).

10\log_{10}(50Ω) is 16.9897dB, for most purposes I’ll just say the load lift the dBW by 17dB when turning it into dBV.

Having both together,

\mathrm{dBW} + 17\mathrm{dB} = \mathrm{dBV}
\mathrm{dBW} = \mathrm{dBm} - 30\mathrm{dB}

\mathrm{dBm} - 30\mathrm{dB} + 17\mathrm{dB} = \mathrm{dBV}
(This is how you should remember it, so you can replace the +17dB for 50Ω with
10\log_{10}(R) when you work on other applications, like 600Ω, 4Ω, 8Ω for audio.)

Basically:

-30dB to undo the mili- prefix at reference power
(with dBm, the power ratio is bloated by 1000 times, aka by 3 zeros)
+17dB to account for the load inducing the voltage by burning Watts

The end result (for the 50Ω case):

\mathrm{dBV} = \mathrm{dBm} - 13\mathrm{dB}

Then you can convert dBV to V_{rms}:

\mathrm{dBV} = 10\log_{10}(V^2_{rms}/1^2) = 20\log_{10}(V_{rms})

V_{rms} = 10^{\frac{\mathrm{dBV}}{20}}

V_{rms} = 10^{\frac{\mathrm{dBm}-13dB}{20}}

Phew! That’s a lot of steps to get to something this simple. So the moral of the story is that these assumptions cannot be ignored:

  • The quantity is always power in dB, not voltages
  • dB(mW) has a reference of 1mW. The smaller the reference, the bigger the numbers
  • RMS voltages and power are used in RF
  • 50Ω is the load required to convert from power to voltages

Keysight already has a derivation, but it’s just a bunch of equations. The missing gap I want to fill in this blog post is that people find this so confusing they’d rather believe a formula or a table pulled on the internet:  it doesn’t have to be this way after realizing that there’s a bunch of overlooked assumptions.


* Technically I should call it (load) impedance Z, as in RF, capacitive and inductive elements are nearly always involved, but I want to make it appealing to those with high school physics background.

Loading