Depicts a foot (止) going out towards city walls (丁). 丁 also represents the sound. Based on the original meaning "to attack (an enemy)", now written as 征. The meaning of this character has shifted over time and now means "correct".
正 and 丁 don't sound similar in modern Mandarin due to historical phonetic changes. They were more similar in older Chinese.正 /*C.teŋ/, /*teŋ-s/ 丁 /*tˤeŋ/, /*tˤeŋ/, /*tˤreŋ/
Due to historical stylistic changes, this component is less similar to 丁 than it was in ancient scripts.
right, proper, correct; straight; upright; proper; main; principal; to correct; to rectify; exactly; just (at that time); right (in that place); (math.) positive